Returns a string that can be used in a client event to cause postback to the server. The reference string is defined by the specified System.Web.UI.PostBackOptions object. Optionally, registers the event reference for validation.
- options
- A System.Web.UI.PostBackOptions that defines the postback.
- registerForEventValidation
- true to register the event reference for validation; otherwise, false.
A string that, when treated as script on the client, initiates the client postback.
To implement the System.Web.UI.IPostBackEventHandler interface for a System.Web.UI.Page object, use the @ Implements directive.
The erload:System.Web.UI.ClientScriptManager.GetPostBackEventReference method can be used with the System.Web.UI.WebControls.Button control when the System.Web.UI.WebControls.Button.UseSubmitBehavior property is false. In this scenario, the erload:System.Web.UI.ClientScriptManager.GetPostBackEventReference method returns the client postback event for the System.Web.UI.WebControls.Button control.
If registerForEventValidation is true, the ClientScriptManager.GetPostBackEventReference(PostBackOptions, bool) method calls the ClientScriptManager.RegisterForEventValidation(string, string) method to register the event reference for validation with a unique control ID that represents the client control that is generating the event.