1、带参数打开网页
Response.Redirect("form2.aspx?id=url1&name=ok");
其中?后面为参数。
2、获取url
命令 | 结果 |
Request.Url.Query | ?id=url1&name=ok |
Request["name"] | ok |
Request["id"] | url1 |
Request.Url.AbsolutePath | /form2.aspx |
Request.Url.AbsoluteUri | http://localhost:41370/form2.aspx?id=form2&name=ok |
Request.Url.Authority | localhost:41370 |
Request.Url.DnsSafeHost | localhost |
Request.Url.PathAndQuery | /form2.aspx?id=form2&name=ok |
Request.RawUrl | /form2.aspx?id=form2&name=ok |