Newer versions of ASP.NET webforms (especially 4.0 onwards) are much more "friendly" towards serving up content based upon the specific device that's accessing the website, as well as having improvements that allow much "cleaner" output of the rendered mark-up that's generated by server-side controls.
This is also true of MVC of course, but don't forget that ASP.NET MVC is written on top of the same ASP.NET runtime that ASP.NET Webforms uses. Because of this, lots of the benefits that are originally exposed via MVC are now available to Webforms, too.
There is a very good whitepaper on Microsoft's ASP.NET site, How To: Add Mobile Pages to Your ASP.NET Web Forms / MVC Application, that explains in detail how features such as Request.Browser.IsMobileDevice
& Request.Browser.ScreenPixelsWidth
(both fundamental features of the underlying ASP.NET runtime therefore equally applicable to both WebForms & MVC) can be used to detect the capabilities of the device currently accessing the website. If you require very detailed information about the device, then you'll need to integrate something like WURFL into your website irrespective of whether you're using WebForms or MVC. Moreover, if you require very specific layouts on devices with different form-factors and aspect ratios, you'll need to provide pages (either MVC views or ASP.NET webpages) that are specifically designed and targeted to those devices either way.
With regard to the ability to cleanly use jQuery with ASP.NET WebForms, since ASP.NET WebForms 4.0, you have the ability to tightly control the ClientID
values that are applied to the DOM elements in the rendered markup. There's a new property called, ClientIDMode
that makes it very easy to ensure you have a known value for an element's ID, thus enabling a much easier use of jQuery. Setting the value of the ClientIDMode
to either of the static
or predictable
values will give you ID values to your elements that are much easier to work with in jQuery. One thing to be aware of here, though, is that since the ASP.NET Runtime is still generating the HTML elements and assigning values to their ID's, you can still end up with duplicated ID values, especially when using compound controls (i.e. controls such as the GridView
control that has it's own ID value, but is itself made up of many constituent controls/elements - each with their own ID's of course).
Overall, the choice between ASP.NET WebForms and ASP.NET MVC will probably come down to what you're most comfortable and productive with. Personally, I would use MVC as I like the additional benefits of it's testability and better separation of concerns over WebForms, although it must be said that ASP.NET WebForms version 4.0+ is more powerful and much improved over the previous versions - you can even have MVC-style routing, extensionless URL's and more with ASP.NET WebForms nowadays.