Click here to Skip to main content
11,496,146 members (505 online)
Click here to Skip to main content

Tagged as

No More Session Variable Misspellings

, 22 Jun 2011 CPOL 2.8K
I prefer to wrap my session variables like this:public class MySession { public string MyValue { get { return Convert.ToString(Session["MyValue"]); } set { Session["MyValue"] = value; } }}
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.

I prefer to wrap my session variables like this:

public class MySession {
  public string MyValue
  {
     get { return Convert.ToString(Session["MyValue"]); } 
 
     set { Session["MyValue"] = value; }
  }
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

bruno1234

Unknown
No Biography provided

Comments and Discussions

 
Generalcool dude :) Pin
sagarworlds27-Jun-11 20:09
membersagarworlds27-Jun-11 20:09 
GeneralReason for my vote of 4 yes i used to the same Pin
code in play23-Jun-11 2:02
membercode in play23-Jun-11 2:02 
Generalyes i used to the same Pin
code in play23-Jun-11 2:02
membercode in play23-Jun-11 2:02 
GeneralSee my alternate. It is like your alternate, except a few th... Pin
AspDotNetDev22-Jun-11 15:39
protectorAspDotNetDev22-Jun-11 15:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150520.1 | Last Updated 22 Jun 2011
Article Copyright 2011 by bruno1234
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid