แก้ไข

แชร์ผ่าน


ImageButton.GetPostBackOptions Method

Definition

Creates a PostBackOptions object that represents the ImageButton control's postback behavior.

protected:
 virtual System::Web::UI::PostBackOptions ^ GetPostBackOptions();
protected virtual System.Web.UI.PostBackOptions GetPostBackOptions ();
abstract member GetPostBackOptions : unit -> System.Web.UI.PostBackOptions
override this.GetPostBackOptions : unit -> System.Web.UI.PostBackOptions
Protected Overridable Function GetPostBackOptions () As PostBackOptions

Returns

A PostBackOptions that represents the ImageButton control's postback behavior.

Remarks

The GetPostBackOptions method creates a PostBackOptions object that represents the ImageButton control's postback behavior. The PostBackOptions object is then typically passed to the ClientScriptManager.GetPostBackEventReference(PostBackOptions) method, which is used to obtain a reference to a client-side script function that, when invoked, causes the server to postback to the page.

This method is used primarily by control developers when extending the ImageButton class.

Notes to Inheritors

You can override the GetPostBackOptions() method in your derived class to modify the postback options for the button control, or to call client-side script when the button is clicked. Be sure to call the base class's GetPostBackOptions() method so that the standard postback options are set.

Applies to

See also