如: <form id="form1" runat="server" action="../Member/Order/OrderCheck.aspx" method="post">
<asp:TextBox ID="TextBox1" runat="server" name="text_name"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
TextBox1的值能在OrderCheck.aspx页面获取到吗?急。谢谢
<asp:TextBox ID="TextBox1" runat="server" name="text_name"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
TextBox1的值能在OrderCheck.aspx页面获取到吗?急。谢谢
解决方案 »
- 这个功能如何实现?
- Jquery UI 里的Dialog 参数
- marquee滚动字幕中如何设置字体?
- 问一个比较弱的问题,Access数据库中删除一条记录时提示“标准表达式中数据类型不匹配”???
- 2005发布时出错.请教高手!!!
- 昨天没有解决的问题,麻烦大家帮我看看,急啊55555。。。
- 怎样使含run=server的form可以被服务器端按钮提交到另一个页面上去?
- like 模糊查找时间/日期类型,sql语名格式问题。
- 方法如何返回一个枚举值
- checkbox多选匡选择后的值提交到aspx文件后。如何得倒这个值?
- 如何限制标签控件label的隐藏功能?
- Linq 去除重复字段,速度求解!
text="Post value to another page"
postbackurl="Button.PostBackUrlPage2cs.aspx"
runat="Server">
</asp:button>在Button.PostBackUrlPage2cs.aspx页面的Page_Load中使用PreviousPage来取得前面页面上控件的值 void Page_Load (object sender, System.EventArgs e)
{
string text; // Get the value of TextBox1 from the page that
// posted to this page.
text = ((TextBox)PreviousPage.FindControl("TextBox1")).Text; // Check for an empty string.
if (text != "")
PostedLabel.Text = "The string posted from the previous page is "
+ text + ".";
else
PostedLabel.Text = "An empty string was posted from the previous page.";
}参考:
http://msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.button.postbackurl.aspx
var s= p.PostText; //接口IMyLastPage中定义的一个属性这样你想用来采集输入的控件不一定放在哪里(比如是在某个容器控件中),也不一定使用TextBox控件。