Click to Rate and Give Feedback

  Switch on low bandwidth view
Members FilterMembers Filter
Frameworks FilterFrameworks Filter
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
ClientScriptManager..::.GetPostBackEventReference Method

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

  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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Gridview example with validation      Steven L Cooper ... AmelMusic   |   Edit   |   Show History

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);
}

Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker