Click here to Skip to main content
15,945,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi experts,
Am using below mentioned code to achieve row selection of a grid view
protected void grdSupplierDetails_RowDataBound1(object sender, GridViewRowEventArgs e)
             if (e.Row.RowType == DataControlRowType.DataRow)
                 e.Row.Attributes.Add("onmouseover", "'pointer'");
                 e.Row.Attributes["onclick"] = this.Page.ClientScript.GetPostBackClientHyperlink(this.grdSupplierDetails, "Select$" + e.Row.RowIndex.ToString());
                 e.Row.ToolTip = "Click to select this row.";
         catch (Exception ex)

But am getting error as
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Can anyone please help me to solve this issue.?
if it is in normal aspx page we can EnableEventValidation="false" in page directive.
How to solve this in sharepoint?

thank you in advance
(Keerthi Kumar)

1 solution


1.Inside the port number Folder you will get web.config File.
2.In web.config file put EnableEvetValidation="false"
inside Page Directive Tag
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900