Interstitial wiring. Is it right to use PrePage in Asp.net?

I found this article on MSDN talking about Cross-Publishing .

I have never worked with Page.PreviousPage. But I think it is interesting.

Do you use it? Is this a good grade or a bad idea?

What do you think about?

Thank.

+3
source share
1 answer

Cross-publishing is an assistant post some data to a different pageand still has asp.net code behind.

Why does this exist? because asp.net has a limitation of one and only form per page. But actually on an html page you can have many forms and many different messages on different pages.

, , , Button ( ), , .

... asp.net html .

<body>
<form method="post" action="samepage.html">
   Username: <input type="text" name="user" />
   <input type="submit" value="Submit" />
</form>

<form method="post" action="page_b.html">
   email for news letter: <input type="text" name="email" />
   <input type="submit" value="Submit" />
</form>
</body>

​​, , asp.net , .

<body>
<form id="form1" runat="server">
Username: <asp:TextBox runat="server" ID="Name" />
<asp:Button runat="server"/>

email for news letter: <asp:TextBox runat="server" ID="email" />
<asp:Button runat="server" PostBackUrl="page_b.aspx" />

</form>
</body>

, PostBackUrl , asp.net , ( ).

, , . , , Redirect, , , . , , .

+4

All Articles