ASP.NET Button PostBackUrlProperty
Button Control
Definition and Usage
The PostBackUrl property is used to get or set the URL of the page to which data is posted back when the Button control is clicked.
Syntax
<asp:Button PostBackUrl="string" runat="server" />
| Property | Description |
|---|---|
| PostBackUrl | A string value that specifies the URL of the page to which data is posted back. The default is an empty string. If set this way, the page will post back to itself. |
Example
Example
The following example sets the postback URL of 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>
Name:<asp:textbox id="TextBox1" runat=Server />
<asp:button id="Button1" Text="Submit"
PostBackUrl="demo_postbackurl.aspx" runat="Server" />
</form>
Try it Yourself »
Button Control Other Extensions