What is the importance of PostBackUrl property of a button?

 Posted by Santhiram on 4/24/2012 | Category: ASP.NET Interview questions | Views: 4508 | 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.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Siva524 on: 5/7/2012 | Points: 10
actually there are 2 types of page submission
1.inline submission
'2.postback submission

1.a webform submits to itself is called as an inline page submissi on.
in this case other form is not involved .

2.a webform submit data to another form by( postbackurl property of a button is set to the url of another page) is called as postback submission.

Login to post response

More Interview Questions by Santhiram