Tuesday, January 12, 2010

Asp.Net Intrinsic properties

By default the System.Web.UI.Page exposes Session, Request, and Response properties.  However often you may want to access these properties outside of the Page context. The easiest way to do it is to use HttpContext.Current static property to obtain the current request’s HttpContext.  Thus, you can obtain a session variable like this:

HttpContext.Current.Session[“userid”].


Vote for two important CodePlex features

Eric Hexter, from MvcContrib project, has just asked the community to go and vote for a few issues with CodePlex. Here is his blog for reference, http://www.lostechies.com/blogs/hex/archive/2010/01/11/a-call-for-help-vote-for-my-codeplex-issues.aspx. Go Vote!