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

Does response.redirect work ?

9 Answers 440 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jon Hobbs
Top achievements
Rank 1
Jon Hobbs asked on 14 May 2007, 10:44 AM
One of the limitations I have found of ASP.NET AJAX is that you cannot use response.redirect on the callback. Which is very annoying because you often have to do some processing on the postback before redirecting, e.g. checking they are logged on.

If I swap to RAD:AJAX Prometheus can I fix this problem ?

Jon

9 Answers, 1 is accepted

Sort by
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 14 May 2007, 12:04 PM
Hi John,

I'm not sure about this but at my end everything works fine with Response.Redirect in ASP.NET AJAX using both regular UpdatePanel and RadAjaxManager. Are you using latest ASP.NET AJAX?

Massimo
0
Jon Hobbs
Top achievements
Rank 1
answered on 14 May 2007, 12:52 PM
I had a look on the web and it seemed to be a common problem, Scott Guthrie discussed it on his blog and said there wasn't a fix for it but that was when the product was still called "atlas".

I will have another look thonight to see what the error message was.
0
Jon Hobbs
Top achievements
Rank 1
answered on 14 May 2007, 01:01 PM
oh, and I just found this...

http://www.telerik.com/help/radcontrols/prometheus/ajxLimitations.html


Anyone know of a workaround ?
0
Vlad
Telerik team
answered on 14 May 2007, 01:43 PM
Hi Jon,

We are not sure about which limitation you are looking for. Is it Response.RedirectLocation? If this is the case you can use Response.Redirect().

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jon Hobbs
Top achievements
Rank 1
answered on 14 May 2007, 02:03 PM
Hi,

When using the asp.net ajax framework I get an error when using response.redirect, I assumed from that article that the same applied to response.redirectlocation but I will check later tonight and post any error messages I get.

This page seems to explain a lot - http://forums.asp.net/thread/1439952.aspx

Thanks, Jon
0
Chris Gillies
Top achievements
Rank 1
answered on 14 May 2007, 02:11 PM
This is an old thread for the RC1 of the MS AJAX. Download the latest version from http://ajax.asp.net
0
Jon Hobbs
Top achievements
Rank 1
answered on 14 May 2007, 02:15 PM
Hi,

I know that's an old thread but my new machine at home definitely has the lates version (installed about 3 weeks ago) on it and the issue seems to still exist.

I will post a code sample and the error when I get home.

Jon
0
Jon Hobbs
Top achievements
Rank 1
answered on 14 May 2007, 08:41 PM
OK, I just tried this again. using ASP.NET AJAX, latest version .

I have a datalist which has a clickable button which directs the user to the following sub...

Sub PhotoCommand(ByVal obj As Object, ByVal E As DataListCommandEventArgs) 
         
        Dim Command As String = E.CommandName 
        Dim Argument As String = E.CommandArgument 
    
        If Session("UserID") Is Nothing Then 
             
        response.redirect("index.aspx")         
 
        End If 
         
    End Sub 


This works fine when not in a updatepanel and the updatepanel works fine without the redirect in it, but when you use the two together and click the button you get the following error in an alert box.

"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 ht'"

Anyone got any idea why this might be ?

Jon

0
Massimiliano Bassili
Top achievements
Rank 1
answered on 15 May 2007, 06:09 AM
I have never seen such error before however you may ask on forums.asp.net for more info.
Tags
Ajax
Asked by
Jon Hobbs
Top achievements
Rank 1
Answers by
Massimiliano Bassili
Top achievements
Rank 1
Jon Hobbs
Top achievements
Rank 1
Vlad
Telerik team
Chris Gillies
Top achievements
Rank 1
Share this question
or