ASP.NET PostBackUrl Property
Definition and Usage
The PostBackUrl property is used to get or set the URL of the target page that is posted back when the ImageButton control is clicked.
Syntax
<asp:ImageButton PostBackUrl="string" runat="server" />
Property | Description |
---|---|
string | String value. Specifies the URL of the target page to be posted back. The default is an empty string, which makes the page post back to itself. |
Example
The following example sets the post URL for the ImageButton control:
<form runat="server"> Name:<asp:textbox id="TextBox1" runat=Server /> <asp:ImageButton id="Button1" ImageUrl="img.gif" PostBackUrl="demo_postbackurl.aspx" runat="Server" /> </form>
Example
- Set the PostBackUrl Property for ImageButton Control