response.redirect(”viewbook.aspx?booktype=计算机“)

来源:百度知道 编辑:UC知道 时间:2024/05/18 03:32:19
response.redirect(”viewbook.aspx?booktype=计算机“)这句话是什么意思呢,麻烦详细说一下,谢谢

把"计算机"这三个字赋给booktype.并且在跳转到viewbook.aspx页面时,把booktype传过去.
viewbook.aspxg面页来个 string y = Request.QueryString["booktype"];
就能接收到"计算机"这三个字了.

我推荐这样写好点.
string s = "计算机";
string url = "viewbook.aspx?booktype=" + s;
Response.Redirect(url);
因为你这种写法我也用过,有时会有错.

页面跳转传值
跳转到viewbook.aspx页,然后把booktype的值传过去