码迷,mamicode.com
首页 > 其他好文 > 详细

get传值

时间:2014-06-09 18:48:32      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   code   java   

 

发送页:

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 }

 接收页: 

bubuko.com,布布扣
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>
bubuko.com,布布扣

 

接收页后台CS代码:

bubuko.com,布布扣
 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 }
bubuko.com,布布扣

 

get传值,布布扣,bubuko.com

get传值

标签:c   style   class   blog   code   java   

原文地址:http://www.cnblogs.com/liubeimeng/p/3777413.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!