How to pass multiple values across asp.net web froms C#
Posted: Thu Mar 29, 2012 9:57 pm
Hi all,
Im having a bit of a headache trying to pass multiple textbox.text values across asp.net pages!
The forms are built to display on mobile browsers, so to provide better user expeience I have broken up the Registration across 3 web forms. form1 - contact info, form2 - auth info i.e. password and PIN, form3 - payment info...
I need to pass all values from form1 and form2 over to form3 so that they can all be passed over to my registration class at the same time so I only need to make one new class object. Entering the class on three separate occasions means a new class object has to be made each tme, which clears the data already held!
Also I cant commit the data after each form1,2 and 3 because if something goes wrong alf way through, half the data still gets added to the database, making it inconsistent!
I am trying not to use 'Session' as I already am using one to control secure folder access and am not keep to use anymore if possible. Thinking about speed at times of high visitor times!
Little help?
P.S. I have tried:
Response.Redirect("~/Mobile/Register_2.aspx?fName=" + Server.UrlEncode(firstNameTextBox.Text));
and
firstName = Request.QueryString["fName"];
But this is only a single value!!!! at max I want to pass 11 values..
Im having a bit of a headache trying to pass multiple textbox.text values across asp.net pages!
The forms are built to display on mobile browsers, so to provide better user expeience I have broken up the Registration across 3 web forms. form1 - contact info, form2 - auth info i.e. password and PIN, form3 - payment info...
I need to pass all values from form1 and form2 over to form3 so that they can all be passed over to my registration class at the same time so I only need to make one new class object. Entering the class on three separate occasions means a new class object has to be made each tme, which clears the data already held!
Also I cant commit the data after each form1,2 and 3 because if something goes wrong alf way through, half the data still gets added to the database, making it inconsistent!
I am trying not to use 'Session' as I already am using one to control secure folder access and am not keep to use anymore if possible. Thinking about speed at times of high visitor times!
Little help?
P.S. I have tried:
Response.Redirect("~/Mobile/Register_2.aspx?fName=" + Server.UrlEncode(firstNameTextBox.Text));
and
firstName = Request.QueryString["fName"];
But this is only a single value!!!! at max I want to pass 11 values..