|
use session.ambardon();
for delete all session
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
Hi Friends ..
In my application I want to disable the back and forward keys of IE. how can I detect which key on IE is pressed using C#.
any code ..
thanking you .
...Keep Smiling...
|
|
|
|
|
use a javascript:
"window.open (this.href, 'popupwindow','width=850,height=700,scrollbars,resizable');return false;">
this opens a window with no top header of the browser.
if this isn't what you want im sure there is some javascript code out there to record key press
|
|
|
|
|
Add on with previouse post ...
You can achieve other ways :
Server Side:
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Client Side:
<head>
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
</head>
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Dev_Motiramani wrote: how can I detect which key on IE is pressed using C#.
Not easily. However, I don't think that you are asking for what you think that you are asking for...
What are you trying to do really?
Are you using a browser control in a C# application?
Are you starting an instance of IE from a C# application?
Are you trying to communicate with an existing instance of IE from a C# application?
Are you trying to use an ActiveX control written in C# as an embedded object in a page viewed in IE?
Or, if you are really confused... are you trying to use C# as a client side scripting language, or trying to call C# code from Javascript?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Buy a basic book on ASP.NET and read it. You cannot detect which key was pressed in IE using C#, because C# code does not run on the browser, javascript does. Even then, there's no guarenteed way to stop the back/forward buttons working, instead, you need to fix your design so you don't require this.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hello friends...
In my application i have to insert an image in thr richtextbox. for that i am having a popup window where i have a file button thourgh which i navigate to the image get the image name and save it on the server.
but now problem is how to call the insertimage meathod(javascript)..
i am giving its code below..
function insertimage(childId,src)
{
var isrc=src;
var RichTextFrame = childId.concat('_RichTextFrame');
document.frames[RichTextFrame].focus();
document.frames[RichTextFrame].document.execCommand("insertimage","",isrc);
}
Help me plzzzz............
Deepak Nigam
|
|
|
|
|
Hi
Currently we have a company private network containing lots of comps and our sql server
A hosting company has our website on their web server outside of our private network
What ways are there to connect from the web server to sql server.
We looked at port forwarding but that wasn't very secure
What other ways or techniques are there to do this.
I have searched the net but most techniques recommend port forwarding
thanks in advance
|
|
|
|
|
|
Here[^] - if you don't want to write your own, there are plenty of controls for sale online.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Can any body help me to create popup in dnn4.8?
|
|
|
|
|
please can you explain in more detail
|
|
|
|
|
I have built a dnn project on online ticket selling.So, there is a module, called, ticketing, for selling ticket. When user click on that module it should be open in a separate browser. That is why I want to open that particular module in a popup.
Thanks
|
|
|
|
|
you can use javascript like so:
onClick = "window.open (this.href, 'popupwindow','width=850,height=700,scrollbars,resizable');return false;">
|
|
|
|
|
Sorry Friend!
The Code you posted, it works on asp.net form. But it does not work on dnn. As I know, in dnn, there is an inbuilt module setting option, through which i can use popup. but the problem is i do not how it should be done
|
|
|
|
|
i think you need to go to a dnn forum then
hope it gets sorted!
|
|
|
|
|
Found any answer? If so, Paste it here... I am facing the same problem.
|
|
|
|
|
Hi! I am writing this procedure:
CREATE PROCEDURE dbo.Table1_InsertText
{
@tblID int,
@tblName nvarchar(50)
@tblPlace nvarchar(50)
}
AS
SET NOCOUNT ON
INSERT INTO Table1
(tblName, tblPlace)
VALUES (@tblName, @tblPlace)
SET @tblID=scope_identity()
and when I want to save it, it says:
Incorrect syntax near '{'.
Must declare a scalar variable "@tblID".
Must declare a scalar variable "@tblName".
Any help?? Thx in advance
|
|
|
|
|
its a common mistake
use (
not {
|
|
|
|
|
thx , it works
|
|
|
|
|
you can also do that without using any bracket
|
|
|
|
|
Hi
i have created custom resource provider and getting the resources from xml file...appliction is not building ... i am getting compile time errors...'the resource object with key is not found'... Plz Provide me solution... here is my code
using System;
using System.Web.Compilation;
using System.Globalization;
using System.Resources;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Xml;
using System.Web;
using System.Web.Hosting;
using System.Web.Caching;
namespace Hydra.Providers
{
public sealed class XmlResourceProviderFactory : ResourceProviderFactory
{
public static ListDictionary resourceList = new ListDictionary();
public XmlResourceProviderFactory()
{
}
public override IResourceProvider CreateGlobalResourceProvider(string classKey)
{
return new XmlResourceProvider(null, classKey);
}
public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
{
//virtualPath = this.GetVirtualPath(virtualPath);
return new XmlResourceProvider(virtualPath, null);
}
public class XmlResourceProvider : IResourceProvider
{
private string _virtualPath;
private string _className;
private IDictionary _resource;
private static object CultureNeutralKey = new object();
public XmlResourceProvider(string virtualPath, string className)
{
_virtualPath = virtualPath;
_className = className;
}
//private IDictionary GetResource(string cultureName)
//{
// _resource = new ListDictionary();
// IDictionary resourceDict = _resource as IDictionary;
// resourceDict = XmlResourceHelper.GetResources(_virtualPath, _className, cultureName, true, null);
// _resource = resourceDict;
// return resourceDict;
//}
private IDictionary GetResource(string cultureName)
{
object cultureKey;
if (cultureName != null)
{
cultureKey = cultureName;
}
else
{
cultureKey = CultureNeutralKey;
}
if (_resource == null)
_resource = new ListDictionary();
IDictionary resourceDict = _resource[cultureKey] as IDictionary;
if (resourceDict == null)
{
resourceDict = XmlResourceHelper.GetResources(_virtualPath, _className, cultureName, true, null);
_resource = resourceDict;
}
return resourceDict;
}
object IResourceProvider.GetObject(string resourceKey, CultureInfo culture)
{
if (string.IsNullOrEmpty(resourceKey))
{
throw new ArgumentNullException("resourceKey");
}
if (culture == null || culture == CultureInfo.InvariantCulture)
culture = CultureInfo.CurrentUICulture;
object value = GetResource(culture.Name)[resourceKey];
return value;
}
public System.Resources.IResourceReader ResourceReader
{
get
{
return new XmlResourceReader(GetResource(null));
}
}
}
private sealed class XmlResourceReader : IResourceReader
{
private IDictionary _resources;
public XmlResourceReader(IDictionary resources)
{
_resources = resources;
}
IDictionaryEnumerator IResourceReader.GetEnumerator()
{
return _resources.GetEnumerator();
}
void IResourceReader.Close()
{
}
IEnumerator IEnumerable.GetEnumerator()
{
return _resources.GetEnumerator();
}
void IDisposable.Dispose()
{
}
}
internal static class XmlResourceHelper
{
public static IDictionary GetResources(string virtualPath, string className, string cultureName, bool designMode, IServiceProvider serviceProvider)
{
//ListDictionary resources = new ListDictionary();
string xmlFilePath;
string strCompanyId = "1";
//string strLayoutId = "1";
string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath);
string aspxPage = oInfo.Name;
string[] aspxPage1 = aspxPage.Split('.');
//HttpContext.Current.Handler
object obj = HttpContext.Current.Request;
//try
//{
// if (HttpContext.Current.Session["CompanyId"] != null)
// strCompanyId = HttpContext.Current.Session["CompanyId"].ToString();
// if (HttpContext.Current.Session["LayoutId"] != null)
// strLayoutId = HttpContext.Current.Session["LayoutId"].ToString();
//}
//catch {}
if (!String.IsNullOrEmpty(virtualPath))
{
// Get Local resources
XmlDocument configurationFile = new XmlDocument();
// xmlFilePath = HostingEnvironment.MapPath(HostingEnvironment.ApplicationVirtualPath + "/Languages/Local/" + strCompanyId + "/" + strLayoutId + "_en-US.xml");
xmlFilePath = HostingEnvironment.MapPath(HostingEnvironment.ApplicationVirtualPath + "/Languages/Local/" + strCompanyId + "/" + aspxPage1[0].ToLower() + "_en-US.xml");
//configurationFile.Load(xmlFilePath);
XmlReader reader;
XmlReaderSettings settings = new XmlReaderSettings();
settings.ProhibitDtd = false;
reader = XmlReader.Create(xmlFilePath, settings);
reader.Read();
configurationFile.Load(reader);
XmlNode node = configurationFile.DocumentElement;
parseResourcefile(node);
}
else if (!String.IsNullOrEmpty(className))
{
// Get Global resources
XmlDocument configurationFile = new XmlDocument();
// xmlFilePath = HostingEnvironment.MapPath(HostingEnvironment.ApplicationVirtualPath + "/Languages/Local/" + strCompanyId + "/" + className + "_en-US.xml");
xmlFilePath = HostingEnvironment.MapPath(HostingEnvironment.ApplicationVirtualPath + "/Languages/Local/" + strCompanyId + "/" + aspxPage1[0].ToLower() +"_en-US.xml");
configurationFile.Load(xmlFilePath);
XmlNode node = configurationFile.DocumentElement;
parseResourcefile(node);
}
return resourceList;
}
public static void parseResourcefile(XmlNode node)
{
foreach (XmlNode childNode in node.ChildNodes)
{
if (childNode.Name.StartsWith("resources"))
{
parseResourcefile(childNode);
}
else
{
if (childNode.Attributes["name"] != null && childNode.InnerText != string.Empty)
{
string rn = childNode.Attributes.Item(0).Value.ToString();
string rv = childNode.InnerText.ToString();
if (!resourceList.Contains(rn))
{
resourceList.Add(rn, rv);
}
}
}
}
}
}
}
}
|
|
|
|
|
hi,
I've installed my web application on a server that is windows 2000 but it really hangs. My application is asp.net ajax enabled and it works fine when I deploy it on windws xp.
What's missing in windows 2000? I've installed the ajax extensions and it already has framework 2.0 installed, and sql server 2000 and 2005 are installed on it. The home page is displayed and everything but when I try to login the page hangs and no error is displayed????
Can someone help me with this...do I have to find a server that has windows xp to deploy my application on or what?
|
|
|
|
|
see if this helps:
http://msdn2.microsoft.com/en-us/library/t6dbcb8d(VS.71).aspx
|
|
|
|