且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

母版页上的处理按钮单击事件

更新时间:2023-11-30 19:31:58

我处理这一个非常简单的方法:

I handle this in a really simple way:

当按钮被点击我只是设置我想寻找到一个会话变量,然后将页面重定向到我的搜索页面,这需要该值的信息

When the button is clicked I simply set the information I want to search for into a session variable and then redirect the page to my search page, which takes that value

         protected void btnSearch_OnClick(object sender, EventArgs e)
    {
            Session["General"] = txtSearch.Text;
            Response.Redirect("\\Search.aspx");
    }