zoukankan      html  css  js  c++  java
  • GET传值

    发送页:

    1 <form id="form1" runat="server">
    2 <div>
    3 <asp:TextBox ID="TextBox1" runat="server">008</asp:TextBox>
    4 <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="进入get页面" />
    5 </div>
    6 </form>

    发送页后台CS代码:

    1 protected void Button1_Click(object sender, EventArgs e)
    2 {
    3     string name = TextBox1.Text;
    4     Response.Redirect(string.Format("get.aspx?tableid={0}", tableid), false);
    5 }

     接收页: 

    1 <form id="form1" runat="server">
    2     <div>
    3          <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    4          <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    5         <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    6    </div>
    7  </form>

    接收页后台CS代码:

     1 protected void Page_Load(object sender, EventArgs e)
     2 {
     3     if (Request.QueryString["name"] != null)
     4     {
     5         this.TextBox1.Text = Request["tableid"];
     6         this.TextBox2.Text = Request.Params["tableid"];
     7         this.TextBox3.Text = Request.QueryString["tableid"];
     8     }
     9  
    10 }
  • 相关阅读:
    Hadoop学习资料收集
    sed使用详解
    shell编程001
    电影《无法触碰》
    正则表达式
    I/O重定向与管道
    bash基础知识
    用户权限模型
    Linux文件管理常用命令
    根文件系统详解
  • 原文地址:https://www.cnblogs.com/liubeimeng/p/3777413.html
Copyright © 2011-2022 走看看