ASP.NET PostBackUrl Property
Definition and Usage
The PostBackUrl property is used to get or set the URL of the page that posts back the data when the Button control is clicked.
Syntax
<asp:Button PostBackUrl="string" runat="server" />
Property | Description |
---|---|
string |
String value, specifies the URL of the page that will post back the data. It is empty by default, if so set, the page will post back to itself. |
Example
The following example sets the post URL for the Button control:
<form runat="server"> Name:<asp:textbox id="TextBox1" runat=Server /> <asp:button id="Button1" Text="Submit" PostBackUrl="demo_postbackurl.aspx" runat="Server" /> </form>
Example
- Set PostBackUrl for Button Control