Response.Redirect not doing anything..

A

Adrian Parker

When using Response.Redirect(var) in my code, the browser just shows a
blank page. It works fine on the development machine (winxp) but not on a
server machine (win2k). If I view the code on the page it's..

<BODY><ASP_SMARTNAV_RDIR
url="/iaw/setstartpage.aspx"></ASP_SMARTNAV_RDIR></BODY>

Any ideas ?

-Adrian
 
G

Guest

hi,
this error comes when you come to the present page via a server.transfer and
then use response.redirect from this page to go to another page and
SmartNavigation enabled.
You can disable smartnavigation for that page or use a server.transfer.

HTH
srini
 
A

Adrian Parker

Using server.transfer works a treat.. it also got me past another problem
where some pages weren't formed properly after a refresh.

Many Thanks
Adrian
 
S

Steven Cheng[MSFT]

Hi Adrian,

As the other communitry member mentioned, this is a known issue in the
ASP.NET serverside when page's "SmartNavigation" property is turn on. And
Server.Transfer has limitation since it can only transfer between pages in
the same web application. In case that you do need to use response.redirect
and keep page's smartNavigation turn on, you can use the following work
around:
turn off the smartNavigation programly before use Response.Redirect, for
exampe:

button_click(...)
{
this.SmartNavigation = false;
Response.Redirect(..);
}

Also, generally we recommend not use SmartNavigation by default because
it'll reduce the page's performance. And here is a former thread discussing
on the same problem, you may also have a look for detailed reference:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=zsjrxEkEEHA.1996%
40cpmsftngxa06.phx.gbl

Hope also helps.Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top