Showing posts with label linkbutton. Show all posts
Showing posts with label linkbutton. Show all posts

Saturday, March 24, 2012

About Sys.WebForms.PageRequestManagerParserErrorException error

Hello everybody,

My ajax powered web site throws an error when pressing a button or linkbutton inside an UpdatePanel.

I've searched for a solution. All of the blogposts, solutions etc is about the "common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled." suggestion written in the error text itself.

But in my scenario, only IE6 (and may be below) users see this error. I am using IE7, and my site works like a charm. (all my friends using IE7 doesn't have problems with the site)

I've searched my code for response.write stuff but there isn't any. I've removed some custom controls (msn like popup win, flash container controls etc.) but it's the same with IE6 users. The error is :

--------
Microsoft Internet Explorer
--------
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 'eTitle||Favorilerim|

0

'.
--------
Tamam (OK)
--------

Anybody have suggestions?

Hi bsarica,

Maybe this article is useful for you:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312496

Regards,


I forgot to mention smthng.

It is not working on firefox too.


Any other suggestions? :(


I had a very similar error when I encountered code where the asynchronous call back was making a call to Server.Transfer(). I'm not sure whether or not this helps you or not, but doing a Server.Redirect() fixed the problem for me.

Wednesday, March 21, 2012

A lil tab issue

I have a selection of ajax tabs each containing diffrent gridviews of data. Each gridview has a template feild with a linkbutton inside of it, the link buttons command ends with a page reload if you will that looks something like this :


Response.Redirect("~/Home/Editor?pid=" + QueryStringPID);

When i click the linkbutton the page doesnt go back to the editor?pid=1 for example. even though that line is within the code... i dont understand it. i tryed putting an update panel within the tab to see if that would help but it doesnt seem to work. The link buttons on_click event isnt strickly an on_click as its a RowCommand. It simply checks the command name and changes it from 1 to 0 or 0 to 1, it worked perfectly well out side of the tab. which is confusing.

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
SqlConnection Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["BlinkConnectionString"].ToString());
SqlCommand Command = new SqlCommand();
Command.Connection = Connection;
Connection.Open();
if (e.CommandName == "0")
{
Command.CommandText = "UPDATE Profile SET " + e.CommandArgument + " = '1' WHERE UserID = " + QueryStringPID;
Command.ExecuteNonQuery();
}
else if (e.CommandName == "1")
{
Command.CommandText = "UPDATE Profile SET " + e.CommandArgument + " = '0' WHERE UserID = " + QueryStringPID;
Command.ExecuteNonQuery();
}
Connection.Close();
Response.Redirect("~/Home/Editor?pid=" + QueryStringPID);
}

Any ideas all are welcome! thanks si!

ps does anyone know how to force a postback for an update panel? thanks si!

sorted it, no worries thanks for anyone who was making an attempt at sorting it! si!