[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

repost:Response.Redirect problem

sp

2/12/2006 8:44:00 PM

Hi;

I am using Mobile ASP.NET v2.0 to develop a mobile accessible site and I
encountered a problem with some of the phones, where Response.Redirect
(behind button click) does not work - Server.Transfer however does work?
Any ideas as to why this is occurring?

Many thanks,
-sp


1 Answer

Egil Hogholt

4/13/2006 7:05:00 PM

0

Hi.
ASP.NET sends a 302 "error" to the client with the new url when you call
Response.Redirect. Many older wap devices do not support these redirects.

You can use RedirectToMobilePage() or return a wml page like this to the
client:
<?xml version='1.0'?><!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN'
'http://www.wapforum.org/DTD/wml_1.1.xm...
<wml>
<head>
<meta forua='true' http-equiv='Cache-Control' content='max-age=0' />
<meta forua='true' http-equiv='Cache-Control' content='must-revalidate'/>
</head>
<card title=' '>
<onevent type='onenterbackward'><prev /></onevent>
<onevent type='onenterforward'><go href='YOUR-LINK-HERE' /></onevent>
<p></p>
</card>
</wml>


Server.transfer works as it happens internally on the server. ASP.NET
transfer the execution from the current aspx page to another aspx page
without notifing the client.

Cheers,
Egil
http://www....

"sp" <spartacus_001@hotmail.com> wrote in message
news:eSx$XUBMGHA.1192@TK2MSFTNGP11.phx.gbl...
> Hi;
>
> I am using Mobile ASP.NET v2.0 to develop a mobile accessible site and I
> encountered a problem with some of the phones, where Response.Redirect
> (behind button click) does not work - Server.Transfer however does work?
> Any ideas as to why this is occurring?
>
> Many thanks,
> -sp
>