I have a code segment (in C#) that is used in several files.
MembershipUser membershipUser = Membership.GetUser();
if (membershipUser != null)
{
ViewState["username"] = Membership.GetUser().ToString();
}
else
{
Response.Redirect("Login2.aspx");
}
What is the best way to store it in one place and use it over again and again (I'm assuming something that is a one liner that will refer to all of the above).
-Larry
...
Go to the complete details ...