ClientScriptManager::GetPostBackClientHyperlink Method (Control, String)
Gets a reference, with javascript: appended to the beginning of it, that can be used in a client event to post back to the server for the specified control and with the specified event arguments.
Assembly: System.Web (in System.Web.dll)
Parameters
- control
- Type: System.Web.UI::Control
The server control to process the postback .
- argument
- Type: System::String
The parameter passed to the server control.
Return Value
Type: System::StringA string representing a JavaScript call to the postback function that includes the target control's ID and event arguments.
Using the GetPostBackEventReference method requires the control that handles the postback to implement the IPostBackEventHandler interface. To implement the IPostBackEventHandler interface for a Page, use the @ Implements directive.
The following code example demonstrates the use of the GetPostBackClientHyperlink method. The custom control, MyControl, implements the IPostBackEventHandler interface. When the HTML anchor element on the page is clicked, the RaisePostBackEvent method of the custom control is invoked.
The following code example has the same functionality as the preceding one, except that instead of a custom control, the Page class implements the IPostBackEventHandler interface.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.