Is there any way that I can preserve a query string and pass it to the default.aspx; For example:
becomes
Thanks in advance!
Yes you can. You could use Request.QueryString["test"]
to get the value from query string and pass it to the other page using
if(Request.QueryString["test"] != null)
{
Response.Redirect("~/Default.aspx?test=" + Request.QueryString["test"].ToString())
}
Do this in Session_Start method of Global.asax.cs
Or if you want to pass the entire query string instead of one value just use Request.QueryString.ToString()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.