在asp.net 2.0中,对于跨页提交已经有了非常合理的解决方案
下面是一个示例:
beginpage.aspx: 请注意button1的postbackurl属性设置

<%
@ page language="c#" %>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

public string name

{
get

{
return this.textbox1.text;
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>untitled page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:label id="label1" runat="server" text="请输入姓名" width="183px"></asp:label>
<asp:textbox id="textbox1" runat="server"></asp:textbox>
<asp:button id="button1" runat="server" text="提交" postbackurl="~/endpage.aspx" /></div>
</form>
</body>
</html>
新闻热点
疑难解答
图片精选