What is the importance of PostBackUrl property of a button?
Interview question and answer by: Santhiram
| Posted on: 4/24/2012 | Category: ASP.NET Interview questions
| Views: 1096 | | Points: 40
By default every webform sumbits to itself,but if the PostBackUrl property of a button is set to the url of another page ,then the form is posted to that url instead of itself.
<asp:Button ID="btnCrossPagePostback" runat="server" PostBackUrl="~/Page2.aspx" Text="Cross Page Postback" />
Here the form is submitted to Page2 instead to the form containing the button.
| Alert Moderator
Found interesting? Add this to: