it's really simple thanks to the magic of the Device Capabilities Assessment
model of ASP.NET Mobile Web Forms.
all you have to do is ask in the "Page_Load" event of your Mobile Web Form,
if the requesting browser Is a Mobile Device.
Your code will look like this:
public void Page_Load(Object sender, EventArgs e)
{
if (Request.Browser["IsMobileDevice"] == "true" )
{
Response.Redirect("MobileDefault.aspx");
}
else
{
Response.Redirect("DesktopDefault.aspx");
}
}
I'm preparing an article on the ASP.NET's Device Capabilities Assessment
Model for PanoramaBox, as soon as it's finished I'll let you know.
Take Care!!!!
--
Juan David Gomez A.
Microsoft Certified Professional
Analista de Desarrollo - PSL S.A.
Web and Wireless Banking
Medellin - Colombia
Luis Esteban Valencia said:
I have a website for normal browsing with ASP.net! but I want that when
people targets at
www.mydomain.com the default.aspx detects if its a mobile or just a normal
browser and redirect to the appropiate file.