This is a migrated thread and some comments may be shown as answers.

[Solved] Adding AjaxSetting is throwing error when redirected using Response.Redirect.

1 Answer 215 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
giridhar
Top achievements
Rank 1
giridhar asked on 08 Apr 2009, 01:56 PM
Hi,
  I have a RadGrid(r) and I have a Panel(lower panel). This panel contains a asp-button. I have added a ajax setting with respect to grid and panel.
AjaxManager.AjaxSettings.AddAjaxSetting(r, lowerpanel);

When I click button I am trying to redirect to other page.
But on redirection it is throwing the following error.

Microsoft JScript runtime error: 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 '<!DOCTYPE HTML PUBLI'.


I have not set any ajax setting saying that lower panel is source of event, why should ajax manaer throw the error??

This is blocker for me... Please do let me know how to tackle the problem.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 10 Apr 2009, 02:05 PM
Hi Giridhar,

In case that you have ajaxified your lower panel where is the asp:button, I suggest that you use the RadAjaxManager to redirect to another page.
C#:
RadAjaxManager1.Redirect("http://www.google.com/"); 

RadAjaxManager and also support the method, which in essence adds a short javascript to be evaluated after the AJAX request.
More information is available in the following article:

Regards, Pavlina
the Telerik team

 

 


Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
giridhar
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or