We help IT Professionals succeed at work.

Page.ClientScript.GetPostBackEventReference not working on one web server

suebarner
suebarner asked
on
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

Thanks,
Jay
Comment
Watch Question

Author

Commented:
Server information update:
Just learned from our web server admin that there are a few differencies between two web sites.  It may provide some clues.

For "Good" server(the application works!), it is a Windows 2003 server, with IIS 6;
For "Bad" one(the application does not work), it is a Windows 7 server, and IIS 7.5. Also, it is a 64-bit OS;
Did u checked the links I posted earlier?

Author

Commented:
we're working on the leads recommended by ajaysharmaapjs, and have not found a solution yet.  Please leave this question open.

Author

Commented:
please close this question.  We removed <update> panel and made it work.  It is not ideal, but we are moving on.  Thanks ajaysharmaapjs!