ASP.NET MVC 3 Razor Mobile Ready Website Template & JQuery Mobile Web Template for Visual Studio 2010 SP1


ASP.NET MVC 3 Razor capability with Visual Studio 2010 has rich support for Mobile Devices. But , in Project development we have to keep all CSS, JQuery, JavaScript files to keep in touch , Copy & Paste in Project Folder / Drag & Drop. For Mobile Specific Views keep in mobile Section all Mobile Javascript, mobile.css, JQuery for Mobile files etc..

What If we have a seperate Template in Visual Studio 2010 for Mobile Ready ASP.NET MVC3 Razor Teamplete & JQuery for Mobile like this.

  •                  For JQuery for Mobile ASP.NET & ASP.NET MVC .

  •  On starting project with Mobile Ready ASP.NET MVC 3 Template, we got inbuilt support of MobileViewEngine file which helps to render the desktop MVC web application to mobile browser by detecting the User-Agent.
  • Having help for Mobile Specific View of websites without using any mobile.browser file or WURFL database. No need to write any extra code for mobile browser rendering logic .
  •   Put the simple logic here: (Already Available in ApplicationHelper.cs in the default project installed with template)

publicstaticbool IsSupportedMobileDevice(thisHttpRequestBase request)

{

bool isMobile = request.Browser.IsMobileDevice;

string userAgent = request.UserAgent.ToLowerInvariant();

isMobile = isMobile || (userAgent.Contains( “iphone”)

|| userAgent.Contains(“blackberry”)

|| userAgent.Contains(“mobile”)

|| userAgent.Contains(“windows ce”)

|| userAgent.Contains(“opera mini”)

|| userAgent.Contains(“palm”)

|| userAgent.Contains(“fennec”)

|| userAgent.Contains(“adobeair”)

|| userAgent.Contains(“ripple”)

);

return isMobile;

  • Next , Run the MVC 3 web application & check the view in desktop as well as in Windows Phone.

                                                                                       Desktop -  View

Mobile-  View

  •  To get the Rich Template in Visual Studio 2010 , go to Tools -> Extension Manager -> Search Online Templates -> Select ASP.NET MVC3 Razor Mobile Ready Template & JQuery for Mobile Template.

  • JQuery for Mobile with rich .css & javascript support. No need to download seperately & copy, paste or make seperate template.

  •  Download it & Install in your Visual Studio 2010 & Enjoy building MVC 3 Razor Website Ready for Mobiles with rich support API of HTML 5, JQuery.

  •    Install in Visual Studio 2010 as default template instead of copy & paste in Project/Item Template of Visual Studio 2010 folders.

  •    Lets work with Visual Studio 2010 installed templates of Mobile Ready ASP.NET MVC 3 Razor & JQuery for Mobile with HTML 5.
About these ads

About imcuteani
Anindita Basak is working as Senior Software Engineer in Microsoft Technologies. Worked in Hewlett- Packards India, Microsoft India & its partners company. Passionate about .NET , Web & Desktop development as well as Mobile & gadjets development. Beside of that I would like to provide Corporate Training to IT giants as part of my experience in IT Training Industry.

3 Responses to ASP.NET MVC 3 Razor Mobile Ready Website Template & JQuery Mobile Web Template for Visual Studio 2010 SP1

  1. Pingback: whores

  2. Pingback: Buy Fan Facebook

  3. Pingback: Buy Targeted Fans

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 161 other followers

%d bloggers like this: