ASP.NET provides mechanisms for storing information for a single user session or across multiple sessions. This is done using the HttpSessionState and HttpApplicationState classes. The Page class has Application and Session attributes to provide access to current objects. The simple way to access them is as following:
if (Session["FirstName"] == null)
{
LabelFirstName.Text = “FirstName”;
}
else
{
LabelFirstName.Text = (string)Session["FirstName"];
}
if (Session["LastName"] == null)
{
LabelLastName.Text = “LastName”;
}
else
{
LabelLastName.Text = (string)Session["LastName"];
}
Continue Reading...
I’ve read about jQuery in this great post Five recommendations for starting a startup with ASP.NET and wanted to play with it and see
how easy it is to call a WebMethod from
sQuery. I Started by reading some of the great Tutorials and downloaded the code from here.
I Created a test web project, copied the jQuery [...]
Continue Reading...
A few days ago I was working on a web application and when I added a ScriptManager and a ScriptManagerProxy to the Master Page and Although the compilation was successful. I got the following error on the designer:
‘ScriptManager’ is ambiguous in the namespace ‘System.Web.UI’,
I said to my self: ah, probably another one of the Visual [...]
Continue Reading...
As we all know whenever we build an ASP.NET application with a MasterPage, all the controls receive a prefix such as “ctl00$<ContentPlaceHolderID>$<NameYouGaveToControl>” to their names according to their place in the page hierarchy. That is done in order to prevent from two controls to have the same ID on the same page.
We encounter a problem [...]
Continue Reading...
Great News!!!
On the occasion of MIX’08, Microsoft has made available for us developers community two of the most highly anticipated previews of the moment. First we have the preview of the second frame model-view-controller currently under development by Microsoft for the deployment of Web applications written in ASP.NET 3.5. Second the first beta release of Silverlight [...]
Continue Reading...
Hi all.
I am currently writing an application that uses the WebBrowser control to perform operations on web pages.Unfortunately I stumbled upon a very annoying problem, sometimes an Internet explorer script error window pops up and stops all execution until you click the OK button.I’ve searched the web for hours and the same answer came [...]
Continue Reading...
Hi Everyone!!!
This is my new blog in which i will Share all I know/hear about/find interesting about Application Development.
For starters i would like to introduce you to http://www.learnvisualstudio.net/ which is a web site that has over 500 Video tutorials about almost anything you can think of that is related to application development, C#, VB, ASP.NET, [...]
Continue Reading...