.NET Framework Class Library
ClientScriptManager..::.GetPostBackEventReference Method

Returns a string that can be used in a client event to cause postback to the server.

Overload List

  NameDescription
Public methodGetPostBackEventReference(PostBackOptions)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 PostBackOptions instance.
Public methodGetPostBackEventReference(Control, String)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 control that handles the postback and a string argument of additional event information.
Public methodGetPostBackEventReference(PostBackOptions, Boolean)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 PostBackOptions object. Optionally, registers the event reference for validation.
Public methodGetPostBackEventReference(Control, String, Boolean)Returns a string to use in a client event to cause postback to the server. The reference string is defined by the specified control that handles the postback and a string argument of additional event information. Optionally, registers the event reference for validation.
Top
See Also

Reference

Tags :


Community Content

AmelMusic
Gridview example with validation

Allows selecting gridview row without select column.

protected override void Render(HtmlTextWriter writer)
{
GridView g = GridView1;
foreach (GridViewRow r in g.Rows)
{

if(DataControlRowType.DataRow == r.RowType)
{
r.Attributes["onMouseOver"] = "this.style.cursor='pointer';this.style.cursor='hand'";
r.Attributes["OnClick"] = ClientScript.GetPostBackEventReference(g, "Select$" + r.RowIndex, true);
}
}

base.Render(writer);
}


Page view tracker