Saturday, December 29, 2012

Add Dynamic Parameters to Query string in ASP.NET

Previous post i have published shows you how to add and read static parameters to a URL query string. Using the below code you can add dynamic parameters to the query string and pass them to the next page.

string Name = "Chamara";
string Country = "Sri Lanka";
Response.Redirect("Page1.aspx?Name=" + Name + "&Country=" + Country + "");

You can find the code from my previous post to read the parameters from the destination page.

No comments:
Write comments
Recommended Posts × +