Request 地址栏传值

request页面

protected void btnSearch_Click(object sender, EventArgs e)
{
Response.Redirect("Request_2.aspx?id="+txtkey.Text);
}
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtkey" runat="server"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="搜索" onclick="btnSearch_Click" />
</div>
</form>
</body>

request_2页面

protected void Page_Load(object sender, EventArgs e)
{
Response.Write("地址栏传至"+Request.QueryString["id"]);
}
protected void btnresult_Click(object sender, EventArgs e)
{
Response.Redirect("Welcome.aspx?name="+txtName.Text+"&sex="+rblsex.SelectedValue);
}
上一篇:Spring Boot集成持久化Quartz定时任务管理和界面展示


下一篇:wireshark 过滤表达式