Thursday, June 12, 2014

How to send arguments Using Query String C# ASP.NET

Hello,

Using Query String we can send data from one page to another page easy

In ASP.NET we can send query string from one page to another page like this

Response.Redirect("FinalPage.aspx?value=myvalue1");

If you need to send multiple values than it is also possible by separating each value by & sign like this

Response.Redirect("FinalPage.aspx?value1=200&value2=201");

Now at the receiving page we need to get these arguments to do this use the following code

string value1 = Request.QueryString["value1"]; 
string value2 = Request.QueryString["value2"];

I hope it was informative for you And I would like to Thank you for reading.

No comments:

Post a Comment