May
7th

Why Should You Wrap Your ASP.NET Session Object

Posted by Shahar A |
Filed under .Net, ASP.Net, C# |

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...
Apr
30th

Call ASP.Net WebMethod from jQuery

Posted by Shahar A |
Filed under ASP.Net, Web Development |

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...
Mar
21st

Ajax ScriptManager Error BC30560

Posted by Amit |
Filed under ASP.Net |

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...
Mar
17th

Find Controls in an ASP.NET Page with A MasterPAge

Posted by Amit |
Filed under ASP.Net |

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...
Mar
6th

ASP.NET MVC TCC 2 and Silverlight 2.0 Beta Now Available

Posted by Amit |
Filed under .Net, ASP.Net |

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...
Dec
9th

Learn Visual Studio .Net

Posted by Amit |
Filed under .Net, ASP.Net, C#, SQL |

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...