ASP.NET ImageButton PostBackUrlProperty


ImageButton 控件ImageButton Control

Definition and Usage

The PostBackUrl property is used to get or set the URL of the target page to post back to when the ImageButton control is clicked.

Syntax

<asp:ImageButton PostBackUrl="string" runat="server" />

Property Description
string A string value. Specifies the URL of the target page to post back to. The default is an empty string, which causes the page to post back to itself.


Example

The following example sets the postback URL of the ImageButton control:

<form runat="server">
  Name:<asp:textbox id="TextBox1" runat=Server />
  <asp:ImageButton id="Button1" ImageUrl="img.gif"
  PostBackUrl="demo_postbackurl.htmlx" runat="Server" />
</form>

Try it Yourself »

ImageButton 控件ImageButton Control Other Extensions