Mobile Ready HTML5 MVC.NET


Create a mobile ready ASP.Net application using jQuery mobile and Razor engine

(8) Review
Visual Studio
Download (161,649)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (8)
Q and A (19)
Sign in to write a review
Sort by:

by Shreeharsh Ambli | April 17 2014

wish this was based on bootstrap

by -Aft3rLif3- | June 30 2012


by jimibt1000000 | January 13 2012


great work, looking fwd to future enhancements. thought I'd add one of my own as this cropped up today. I needed to use a partial view and kept getting the website version coming in. I then realised that I needed to add the findpartialview override as well. I'm gonna add this into the Q&A section in case this is required by anyone else.


by Santhosh Sivarajan- | November 08 2011

Good job guys!

SammyAgeil November 09 2011
| Edit |

Thanks Santhosh

by mEm1337 | November 03 2011

Thank you for this nice template. I've tested it on different phones (Pohne7, iPhone, Android, Blackberry) and it works just fine.

However, one question remains open: What are the license agreements for this template?

SammyAgeil November 09 2011
| Edit |

The template is free to use and or modify in any way you wish.

by LamPhatTai | October 20 2011

Is it provide emulator? If not, what emulator I use? please let me know.
Thank you. Justin

SammyAgeil October 21 2011
| Edit |

the demo uses Air iPhone from

by wluque | September 06 2011

Excelente Template !

by Jim Solo | July 19 2011

Thank you very much for the template.
Did you create any helper methods to create the jq ui instead of using strings?


SammyAgeil July 19 2011
| Edit |

Thanks Jim.
I am actually working on some helper methods to simplify creating Grid input types and other jQuery Mobile controls. All will be published once completed.


Sammy Ageil

Sign in to start a discussion

  • Error while opening the template
    2 Posts | Last post April 09, 2014
    • I installed the template "Mobile Ready HTML5 MVC.NET" in VS2010 ultimate. When I try to create new project from template, I am getting error saying "The project file c:\Users\<user>\AppDate\Local\Temp\xrmef1l1.5rc\Temp\MobileReadyHtml53.csproj cannot be opened.
      The project type is not supported by this installation."
      I did't found anything inside "C:\Users\ra276363\AppData\Local\Temp\xrmef1l1.5rc"
      Please help me to fix this issue.
    • You will need to install MVC 3.0 and Web Standards Update for Microsoft Visual Studio 2010 SP1
      And of course you have to have MVC 3.0 installed as well.
  • Adding Background Image
    2 Posts | Last post August 05, 2012
    • I just started working with MVC3 Mobile Ready Template and MVC3 razor view engines.
      I have a project where I need to laydown a mobile background image but I don't know where in the master mobile layout to put it where some other jquery or css rule will not override the image.
    • Just,
      The mobile css is pulled directly from jquery mobile site.
      Look in the master.cshtml in shared/M directory to see all CSS and javascript references.
      to apply your background image, use the rules outlined here
  • FindPartialView override in MobileViewEngine
    5 Posts | Last post May 02, 2012
    • Sammy,
      As mentioned in the comments section, I needed to grab a few partialviews and found that the viewengine override wasn't giving me those, so here's the addition to the MobileViewEngine class:
              public override ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache)
                  ViewEngineResult result = null;
                  var request = controllerContext.HttpContext.Request;
                  if (request.IsSupportedMobileDevice() && ApplicationHelper.HasMobileSpecificViews)
                      string viewPathAndName = ApplicationHelper.MobileViewsDirectoryName + partialViewName;
                      result = base.FindPartialView(controllerContext, viewPathAndName, true);
                      if (result == null || result.View == null)
                          result = base.FindPartialView(controllerContext, viewPathAndName, false);
                      result = base.FindPartialView(controllerContext, partialViewName, useCache);
                  return result;
      cheers for now
    • Oh and one quick question. Where does the 'Mobile...' (to the left of the log on button) trim get generated from??. I've searched the source and can't (in the short space of time that I've been looking at it) locate where this is. In reality, I'd like to change this trim to something else, so would be good to know where this lives. 
      thanks again
    • The button  is generated from the login partial.
      the reason you got the error is because you referenced the full path of the partial view.
      I didn't want to have two separate rules to locate the view based on the device.
    • I can't figure out where the 'Mobile ...' text came from either.  Can either of you please advise?  Thanks!
    • timetoprogitup - sorry just getting back now. If you haven't already found it, you can find the 'Mobile ...' reference in the : Views\Shared\M\_Layout.cshtml file. it's under the section: <h1 aria-level="1">Mobile MVC3.0</h1>. basically, this gets truncated and that's why a search for it yielded no results. 
      hope thid helps somebody else too.
  • Error when trying to install extension
    2 Posts | Last post April 04, 2012
    • Whenever I try to install this extension an error dialog appears with the following message:
      "The extension could not be installed because the following error occurred:
      Object reference not set to an instance of an object."
      Any idea what might be going on? I don't see any additional errors in the Application event log or anything that seem to be helpful. I'm using VS2010, v10.0.40219.1 SP1Rel with .Net Framework 4.0.30319 SP1Rel.
    • You will need to install MVC 3.0 and Web Standards Update for Microsoft Visual Studio 2010 SP1
  • Using Areas:
    2 Posts | Last post April 04, 2012
    • Again me.... 
      I'm using "Mobile Ready HTML5 MVC.NET" for a large project and now i'm using Areas to keep the house in order. 
      The problem is that MobileViewEngine can't find the views on the current areas.
      Can you help me with that? 
      Very tks. 
    • Not sure why you cant locate the view within an Area?
      can you check if the area is actually registered? can you post the code where the engine fails to locate a view within the area?
      I can try to set up an area example for you if you like. I know it work with areas because I used it with Areas multiple times.
  • The extension already installed to all applicable products
    2 Posts | Last post April 04, 2012
    • When I try to install, I get an error that says "extension already installed to all applicable applications" However, I don't see the extension anywhere in VS2010 and I've never installed this before, so I don't understand why I'm getting this error.
      I have a 64-big Windows 7 machine with VS2010, LightSwitch, Dev-X, and ComponentOne installed.  What do you think the problem might be?
    • Can you check if the template was installed but the installation got corrupted?
      see if you can get an update on the template.
  • Unable to Use the template
    2 Posts | Last post March 12, 2012
    • I get the error "The project type is not supported by this installation", when I try to create a new solution using the template 
      Could you please let me know the prerequisites for using this template?
    • You need to install mvc3 first.
  • Android 2.3 don't render
    2 Posts | Last post January 29, 2012
    • Hi, first.. very tks great work.
      My question is.... i'm testing with android 2.3 and the pages don´t render, with ios 5.0 works fine.
      What can i do?
    • I'm was reviewing user_agent response from Android 2.3 default Browser and it don't send anything usable to indentify it is a mobile. 
      Well all  i did was:
      Install Opera mobile on that android and now opera returns Android in the user_agent.
      Be carefull opera user_agent was configured as tablet mode.
  • Login/Register problem
    1 Posts | Last post January 12, 2012
    • Hey, 
      First off, I would like to thank you for a great template. Nice work! 
      I have a small problem though. I using the exact same membership system as in the template, ie the in built membership provider. This works great when I'm running the app on my computer browser(chrome and firefox), but when I try to login or register on my mobile (Iphone 4s), the page will freeze when loading the page. It's pretty strange. Maybe the half of all times I try to login/register through my mobile, I get this error. When I reload the page, it says "Error loading the page". I'm sure it's not that I'm using wrong username or password. It must be something that is happening in action LogOn and Register. The problem never occurs when running the mobile app on my computer browser in production. 
      Anyone that have experienced this problem too? What can be wrong? 
  • Mobile View updates after sign-in/sign-out
    4 Posts | Last post January 01, 2012
    • Hi, in the MVC Mobile template, in the Mobile views (not normal views) I see an issue with the Sign-in/sign-out. 
      After sign-in it seems some of the pages are still cached, and not showing the sign-in without a browser refresh. Similarly after sign-out you can navigate to signed-in pages still.
      I tried to over-come this by adding rel="external" to the action-links. This forces re-freshes, and on a PC it seems to work (although a bit slower).
      But the result is rather ugly on mobile (Android 2.2, WP7 and Symbian Belle tested): With rel="external" the pages first render without js/css and then render-flashes again with full jquerymobile page.
      On the other hand, after adding rel="external" to all the links, the top-menu tabs seem to work better, i.e. the selected tab gets the theme color correctly.
      It seems that on desk-top view this issue is not present, it is only mobile.
      Do you have any idea how to mitigate this problem, using rel="external" is clearly not the way to go.
    • Kelpiercer,
      jQM can handle caching by using an attribute on the page "data-role="page" data-cache="never"
      if you set data-cache to never and still have issues, you can use the script below to clear the cached page
      jQuery('div').live('pagehide', function(event, ui){
            var page = jQuery(;
            if(page.attr('data-cache') == 'never'){
    • Hi Sammy, thank you for replying!
      What I mean is that this issue exists already in the Mobile Ready HTML5 MVC.NET template.
      This is how to demonstrate the problem:
      1) From VS, add new project, select Mobile Ready HTML5 MVC.NET template.
      2) Modify method "IsSupportedMobileDevice" in the ApplicationHelper.cs so that it always returns "true"  (i.e. indicates the client is a mobile device, although actually using PC browser)
      3) Press F5 (run - browser window opens to the MVC3 mobile Home/Index view)
      4) Click/touch "Log on", and log yourself on. 
      5) You will now see the Home/Index view saying at header "Welcome ..." and "Log off"
      6) Click /touch "About" - you will see Home/About view with "Welcom ..." and "Log off"
      7) Now click/touch "Home" - you will see Home/Index view saying only "Log on", i.e. this view now doesn't know that you had already signed in!!
      8) The same problem will be present when you decide to log off.
      Now, one of the principles of jQuery Mobile is that you would not always load/refresh the pages, right?
      So, if I set data-cache="never" to all the links I have, or user rel="external", then wouldn't this make the performance on a mobile device unnecessarily worse in typical events when there is no sign-in or sign-out, but the user just using the application normally?
      Is there a neat way to solve this problem, and should that be added to the template too?
      Thank you for publishing your work!
    • Kelpieracer,
      I would test jqm in a desktop browser. The library is meant for mobile any mobile emulator to test against.
      You don't have to make all links external, you just need to mark the login and logout links as external
          (Request.IsAuthenticated) {
          <text>Welcome <strong>@User.Identity.Name</strong>!
            <a data-role="button" class="no-Ajax" data-transition="flip" rel="external"  style="float:right" href="@Url.Action("LogOff","Account")">Log off</a>
      else {
          <a data-role="button" class="no-Ajax" data-transition="flip"  rel="external" style="float:right" href="@Url.Action("LogOn","Account")">Log on</a>
      I have a few mobile devices to test this against, once I complete the test, if an  update to the template is needed I will do that.
      Thank you,
      Sammy Ageil
1 - 10 of 19 Items