Is it possible to send an entire class to another web page using
session variables? Alternately, what is the most efficient way of transferring all the contents of a form to another form using session variables. It would contain sensitive info so I wouldn't want it in the URL.
I can't do:
Session["Name"] = theClass;
because it can't convert an object to a class.
I can transfer single values using something like this:
//in the originating page
Session["Name"] = theClass.UserID;
Response.Redirect("MemberRegistrationResult.aspx");
//in the receiving page
newMember.UserID = Session["Name"].ToString();
userIdResult.Text = newMember.UserID.ToString();
But I need to know how to send all the values contained in my class
over. Thanks for your help.
session variables? Alternately, what is the most efficient way of transferring all the contents of a form to another form using session variables. It would contain sensitive info so I wouldn't want it in the URL.
I can't do:
Session["Name"] = theClass;
because it can't convert an object to a class.
I can transfer single values using something like this:
//in the originating page
Session["Name"] = theClass.UserID;
Response.Redirect("MemberRegistrationResult.aspx");
//in the receiving page
newMember.UserID = Session["Name"].ToString();
userIdResult.Text = newMember.UserID.ToString();
But I need to know how to send all the values contained in my class
over. Thanks for your help.