We help IT Professionals succeed at work.
Get Started

Page.ClientScript.GetPostBackEventReference not working on one web server

suebarner asked
Last Modified: 2012-05-12
I have a gridview, and using the code below to edit a specific row.  

protected void grdvCategory_RowCreated(object sender, GridViewRowEventArgs e)
        if (e.Row.RowType == DataControlRowType.DataRow)
            e.Row.Attributes.Add("onmouseover", "this.style.cursor='hand';this.style.backgroundColor='#E0F8E0';");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='';");
            e.Row.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference((System.Web.UI.WebControls.GridView)sender, "Select$" + e.Row.RowIndex.ToString()));

When a record is clicked, some editing buttons will be activated.  I deployed my application to one web server, and everything worked fine as expected.  However, it does not work on another web server.  Using IE8, I was able to retrieve these error message:

Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'user7108|u'.
Line: 938
Char: 13

Watch Question
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE