Link to home
Start Free TrialLog in
Avatar of thenthorn1010
thenthorn1010Flag for United States of America

asked on

How to Pass Parameters from One ASPX page to Another And How to Read Those Values that Are Passed

I have built a website that has some textboxes on the first web page that needs to pass the data to second ASP.NET page. I was wondering if someone could tell me how you would go about passing a couple of parameters, for instance gallons, price, and time, in a url from one page to another. (for the question, assume that the first page is going from http://page1.aspx to http://page2.aspx. [I am new to ASP.NET/C# programming, so I apologize in advance if I need a little bit more clarification in advance on an answer that is given by someone in this forum.] The data that is being passed to a second page needs to be read by the second page using C#/ASP.NET, and I was also wondering if someone could let me know how to extract those values that were passed from the first page to the second page.)

Thank you in advance for your time and your help.
ASKER CERTIFIED SOLUTION
Avatar of Friman001
Friman001
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I forgot a "]" in the second example!  Sorry!  It should be:
string holder = Request.QueryString["variablename"].ToString();
string holder2 = Request.QueryString["variablename2"];

Open in new window