by Eric B. Sowell

Welcome! This is online home for my book, Mobile ASP.NET MVC 5, which will be published by Apress in the next few days. When it comes out, I would appreciate any feedback that you have. You can email me at, hit me up on twitter @mallioch or find me at my website,

This site is primarily for all of my samples in the book that are meant to be tested in the browser. Not every chapter has these, so to get all of the samples, including these, you can get the source code from the Github repository here .

Note that most of the sub-pages have no styling. This is on purpose since most of the pages are meant to be bare examples. And they are meant to be used in conjunction with the book, so those not following along in the text will have limited use for them.

If you haven’t bought the book (why not?), you can buy it on the Apress website or order it on Amazon.

Source Code

There are several ways to get the source code. First, APress should have the source code up on their website. It has been submitted so it should show up soon if it isn't already there.

Second, you can download the source code using Git. The following should do the trick, assuming you have Git installed: git clone You can also browse the code on GitHub.

Third, you can download all this code as a zip file. Go to my GitHub page for this project and click on the "Download Zip" button.

Should You Buy This?

This book is primarily designed to help ASP.NET MVC developers develop for mobile browsers. If this fits you, you should find this book helpful as it covers a range of topics from Responsive Web Design, conditional rendering, feature detection, performance, HTML5, touch development and more. See the chapters below for more detail.

But I Use ASP.NET Webforms!

That is okay. Most of the material here is about client-side development, so there is a lot still for you.

But I Don’t Use ASP.NET!

Then you may not want it but most of the material is about client-side development, so there is a lot still for you.

Is This a Beginner ASP.NET MVC Book?

No it is not. This assumes some small bit of familiarity with ASP.NET MVC in any version.


Chapter 1: The Basics of Responsive Web Design

In this chapter I discuss the basics of Responsive Web Design, which I think is the right place to start when starting a new mobile website these days. This chapter is the overview, chapters three through five are the deep dive into the approach.

Chapter 2: CSS Layout Bootcamp

Chapter 2 is for all those developers who find layout in CSS hard unless they use tables. It's not so bad, once you know the rules.

Chapter 3: Flexible Layouts

Now that chapter 2 has equipped you to create layouts in CSS, this chapter shows you how to make layouts that flex and reshape based on context.

Chapter 4: Flexible Navigation

Flexible navigation is a special case of flexible layouts but is an important one. We go through a number of ways of solving layout problems in responsive scenarios.

Chapter 5: Flexible Content

Flexible layouts are useless if your content can’t adapt. After all, our websites exist to show our content. So here we discuss having flexible text, images, tables and video.

Chapter 6: Displays Modes, View Engines and HTML Helpers

In this chapter we dive into ASP.NET MVC, discussing its ways of rendering markup and how we can leverage those to provide the flexibility we need for mobile.

Chapter 7: Device and Feature Detection

Sometimes it is crucial to know something about the device visiting the page or its capabilities. Here we discuss strategies for doing this.

Chapter 8: Mobile performance

Performance is particularly important for mobile so we have a discussion of various important techniques for making your mobile websites perform better.

Chapter 9: Native APIs, HTML5 and CSS3 on Mobile Today

A chapter exploring what works well on mobile devices today. Despite being a bit buggy, mobile browsers are surpisingly capable.

Chapter 10: Programming for Touch

One of the great things about mobile browsers is that all the modern ones have nice touch APIs. In this chapter I discuss the basic APIs, give a few samples and show how to program for the various touch programming models.

Chapter 11: Advanced Touch Programming

This chapter will include more samples of touch programming and go through more concepts around making a better touch experience.

Chapter 12: Third party libraries

This book is primarily about the core skills and techniques to do mobile development. But sometimes it's good to use a library instead of coding something yourself, so we discuss a number of different libraries to use when making mobile websites, what they are good for and in some cases the drawbacks to using them.

  1. Responsive Web Design
    1. Bootstrap
    2. Zurb Foundation
    3. FitText
    4. FlowType
    5. Enquire
    6. Respond
  2. User Interface Libraries
    1. Swipeview
    2. Hammer
    3. Pointer-Event Polyfilling
  3. Mobile Application Frameworks
    1. jQuery Mobile
    2. Kendo UI Mobile
    3. Sencha Touch


No one is perfect and books created by these imperfect people also have issues! This book is no exception. Many thanks to those who are willing to point out issues with the book.

Other Links

  1. Viewport sample
  2. Portrait and landscape experiment
  3. Resolution media query