BeanSoftware Logo
 

 
ASP.NET Database Search Control
 
 

 
 Home
    Shop
    Advertise
    Write For Us
    Affiliate
    Newsletter
    Contact

How To Post Back To Other Page With Button Control Click?

If you click to button control on page, the form will submit and the same page will be loaded again. That is default behavior, but it is possible to post back to other page by using button control PostBackUrl property, with code like this:

<asp:Button ID="btnGO" runat="server" Text="Submit To Second Page" PostBackUrl="~/SecondPage.aspx" />

 

Or, we can set it at run time, with server side code, like this:

[ C# ]

btnGO.PostBackUrl = "~/SecondPage.aspx";

[ VB.NET ]

btnGO.PostBackUrl = "~/SecondPage.aspx"



Related articles:

1. XmlDataSource Control
2. Debugging with "Stepping" and "Data Viewing" features
3. Can I Create First Letter As Drop Case By Using CSS Styles?

FAQ toolbar: Submit FAQ  |  Tell A Friend  |  Add to favorites  |  Feedback



Copyright © 2002-2008 Bean Software. All rights reserved.