Mobile Web Application
-
What are my options for creating websites for mobile? What is WAP? Or use ASP.net to sniff which browser the request came from?
Hello Use standard ASP.NET website project for creating mobile website. Important thing here is to detect request, if it is from mobile device than redirect user to mobile compatible pages instead of standard website. For accurate and easy mobile device detection use http://51degrees.codeplex.com[^] It is an ASP.NET open source module which detects mobile devices and provides auto redirection to mobile optimized pages when request is coming from mobile device. It makes use of WURFL mobile device database. Sample web.config configuration for redirecting users to different mobile pages based on MobileDeviceManufacturer property. You can create your own custom rules for redirection based on other mobile properties.
<redirect firstRequestOnly="false"
mobileHomePageUrl="~/Mobile/Default.aspx" timeout="20" devicesFile="~/App\_Data/Devices.dat" mobilePagesRegex="/(Apple|RIM|Nokia|Mobile)/"> <locations> <location url="~/Apple/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="Apple"/>
</location> <location url="~/RIM/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="RIM"/>
</location> <location url="~/Nokia/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="Nokia"/>
</location> </locations> </redirect>