hi
u can use these codes to redirect a page to an ASP.NET Mobile Web Page .
http://msdn2.microsoft.com/en-us/library/fhhycabe.aspx
There are some problems here.
<script runat="server" language="c#">
public void Page_Load(Object sender, EventArgs e)
{
if (Request.Browser["IsMobileDevice"] == "true" )
{
Response.Redirect("MobileDefault.aspx");
}
else
{
Response.Redirect("DesktopDefault.aspx");
}
}
</script>
<configuration>
<system.web>
<httpRuntime useFullyQualifiedRedirectUrl = "true" />
</system.web>
</configuration>
response.redirect code doesn't work at this code.
To solve this problem u must delete "<httpRuntime useFullyQualifiedRedirectUrl = "true" />" this code from web.config file.
if u add this , it doesn't work.
(I know that Microsoft says add this code to web.config file.But if u add this,there is a problem with redirecting.)
And the second problem;
This code doesn't work at some of the mobile phones.
So u have to change the
(
<identification>
<capability name="majorversion" match="^[5-9]" />
</identification>
)
majorversion in the file.
change 5-9 to 4-9
<capability name="majorversion" match="^[4-9]" />
U can find the file to change in "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG"
this path.
Umit