Page.RaisePostBackEvent Method (IPostBackEventHandler, String)
Notifies the server control that caused the postback that it should handle an incoming postback event.
Assembly: System.Web (in System.Web.dll)
Protected Overridable Sub RaisePostBackEvent ( sourceControl As IPostBackEventHandler, eventArgument As String )
The Page object calls the method when a postback occurs. This call occurs in the page life cycle after loading and change notification are complete but before prerendering occurs.
The following example uses the userButton server control is clicked.method to notify ASP.NET that a post-back event is raised when a custom
Sub DisplayUserName(Sender As Object, e As EventArgs) Response.Write("Welcome to " + Server.HtmlEncode(userName.Text)) End Sub Sub MyRaiseEvent(Sender As Object, e As EventArgs) 'Raises a post back event for a control. Me.RaisePostBackEvent(userButton, "") End Sub Sub Page_Load(Sender As Object, e As EventArgs) 'Registers a control as one that requires postback handling Me.RegisterRequiresRaiseEvent(userButton) End Sub
Available since 1.1