Hello GuysWith growing number of mobile devices today it is very important for mobile web development that we detect the right mobile device and redirect user to the mobile layout content automatically to have good user experience. http://51degrees.codeplex.com 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. You can very easily perform auto mobile redirection without updating any of your existing ASP.NET website pages by just updating your web.config as shown in sample below. In this example MobileDeviceManufacturer is used as the property. Both WURFL capabilities and ASP.NET Browser properties can be used with the property attribute. If none of the locations match and the requesting device is a mobile device then the mobileHomePageUrl will be used <em><fiftyOne>
<redirect firstRequestOnly="true"
mobileHomePageUrl="~/Mobile/Default.aspx"
timeout="20"
devicesFile="~/App_Data/Devices.dat"
mobilePagesRegex="/(Apple|RIM|Nokia|Mobile)/"> <locations>
<location url="~/Apple/Default.aspx">
<redirect firstRequestOnly="true"
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">Read more: Microsoft ASP .NET Forum
0 comments:
Post a Comment