locked
VS 2010 says to discontinue using System.Web.UI.MobileControls, how do I do that? RRS feed

  • Question

  • User-1715607868 posted

    Is there a step by step example that shows how to replace System.Web.UI.MobileControls with whatever is the new way?  I see System.Web.UI.Mobile so is that a different dll that replaces System.Web.UI.MobileControls?

    I downloaded the MobileEnabledWebFormsApp example and the differences between the controls in the desktop and mobile versions seems to be primarily the style sheets and the following meta tag.

    <meta name="viewport" content="width=device-width">

    Wednesday, May 22, 2013 2:31 PM

Answers

All replies

  • User1943143334 posted

    Hi,

    General ASP.NET website works absolutely fine with all Mobile browsers! The Viewport meta tag helps to make the website Mobile compatible!

    Yeah, MobileWebControls are depreciated!

    More info on Mobile web development - http://roopeshreddy.wordpress.com/2012/12/29/mobile-web-applications-with-asp-net-webforms/

    Hope it helps u...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 22, 2013 3:05 PM
  • User-1715607868 posted

    Just to recap for anyone else as slow on the uptake as I was;

    Get rid of the reference to System.Web.UI.MobileControls.  Add <meta name="viewport" content="width=device-width"> to your <head> section.
    All of the <asp:mobile...> tags need to be replaced with normal controls.  The ID attribute of each tag can stay the same so even the codebehind doesn't need changing.

    Wednesday, May 22, 2013 5:37 PM