J
Jason Shohet
2 questions for anyone who can answer:
1. in class declarations, I realize you have to use the NEW keyword if you
want to declare & instantiate some class at the same time. Whats an
advantage for just declaring at the top of say, an aspx page, and then
instantiating when you need it in various functions in the page?
2. I can't seem to figure out a way to use the NEW keyword to instantiate a
class coming from a session object. ie, where do I put the NEW keyword in
below, so that I can grab from the sesion only once in the page, and not in
every function that I need objUser?:
public cUser objUser = (cUser)Session["objUser"];
Thanks for the clarification
Jason Shohet
1. in class declarations, I realize you have to use the NEW keyword if you
want to declare & instantiate some class at the same time. Whats an
advantage for just declaring at the top of say, an aspx page, and then
instantiating when you need it in various functions in the page?
2. I can't seem to figure out a way to use the NEW keyword to instantiate a
class coming from a session object. ie, where do I put the NEW keyword in
below, so that I can grab from the sesion only once in the page, and not in
every function that I need objUser?:
public cUser objUser = (cUser)Session["objUser"];
Thanks for the clarification
Jason Shohet