Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/theme.php on line 507

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-content/plugins/codesnippet/codesnippet.php on line 248
Tryangled Dev » Blog Archive » How do I pass form data between pages?

How do I pass form data between pages?

There are quite a number of ways to do this and depending on the task at hand, you would probably want to use a different method. If you are thinking of passing form data to another page for Ex 3 it’s actually not necessary, you can place it all in one page.

1. QueryString - Put it in the URL

In the button onclick event, you can Response.Redirect to another page placing the variables in the URL.

e.g.
String strURL = String.Concat(”results.aspx?name=”, txtName.Text, “&age=”, txtAge.Text);
Response.Redirect(strURL);

Then on your results.aspx page you can call Request.Params[”name”] to get the name and Request.Params[”age”] to get the parameters.

Posted by Mahesh ( Tryangled )

Leave a Reply

You must be logged in to post a comment.