locked
how to create a mobile version of a website? RRS feed

  • Question

  • User97111691 posted

     how to create a mobile version of a website?
    Is there any server support needed?
    How does the browser detect whether the url is accessed via mobile device or a PC?

    Monday, September 14, 2009 5:45 AM

All replies

  • User1287880341 posted

    Hi,

    If you have VS2005 or later installed you don't need anything else. It works just like building a regular website. Create a Website(not webapp) and when you add a new page choose "Mobile web form". This will run on IIS just like a regular asp.net website.

    Below I've added some links to help you get started developing a website for mobile devices:

    http://www.asp.net/mobile/

    http://www.wwwcoder.com/main/parentid/470/site/3903/68/default.aspx

    http://www.asp.net/mobile/overview/

    Hope this helps!

    Monday, September 14, 2009 7:39 AM
  • User97111691 posted

     What if I have a plain HTML website rather than ASP.Net application?

    Tuesday, September 15, 2009 6:18 AM
  • User78336405 posted

     Hi,

    Your question is related to Mobile and Handheld Devices. I suggested  you go to Home

    ASP.NET Forums » Advanced ASP.NET » Mobile and Handheld Devices. And they will do that better.
    Thursday, September 17, 2009 11:06 PM
  • User-2145084242 posted

    Hi,

    That's true. Please refer to many similar topics that were discussed on Mobile and Handheld Devices.


    Best Regards,

    John.

    Friday, September 18, 2009 2:39 AM
  • User1634317999 posted

    The mobile forum has two big problems:

    1. Questions like "How to create a mobile web site?", "How to send SMS?" and "How to detect mobile devices?" are asked again and again.

    2. Nobody has recognized that ASP.NET Mobile Controls are obsolete since years.

    Thank you

     

    Friday, September 18, 2009 4:55 AM
  • User1135281112 posted

    Hello 

    To detect whether URL is accessed via mobile device or a PC please use following sample source code links.

    Samples for C# using VS2005  &  VS2008

    Note:
    For VS2008 sample to run please install templates as per below instruction.

    Visual Studio 2008 default installation does not have "Mobile Web Form" template.  To develop mobile web applications/websites the necessary templates need to be installed. To install these templates download them from Visual Web Developer Team Blog Post, extract the ZIP file, and follow the instructions in the included readme.txt files attached to each of the extracted Zip folders.

    Visual Studio 2005 users do not require installing these templates as they already installed.

    Output: [It gives all detailed information above the mobile device making request]


    Resource:
    1) Sample application is created using http://51degrees.codeplex.com/. Please have a look for more details. It gives all detailed information about capabilities of mobile making request. It also supports automatic redirection to mobile specific page when request is made from mobile device.

    2) To test above application download necessary emulators from http://www.51degrees.mobi/Products/MobileEmulators/tabid/87/Default.aspx

    Thursday, September 24, 2009 1:08 AM
  • User1634317999 posted

    To detect if the request comes from a mobile device the .NET Framework fortunately provides the isMobileDevice property:

    C# Copy Code <script runat="server" language="c#">
        public void Page_Load(Object sender, EventArgs e) 
        {
            if (Request.Browser["IsMobileDevice"] == "true" ) 
            {
                Response.Redirect("MobileDefault.aspx");
            }
            else 
            {
                Response.Redirect("DesktopDefault.aspx");
            }
        }
    </script>

    Code stolen from here.

    We had the same topic several time in this forum. cf. http://www.google.de/search?hl=de&q=SKT_01+ismobiledevice+site%3Aforums.asp.net&meta=


     

    Thursday, September 24, 2009 5:24 AM
  • User1634317999 posted

    2) To test above application download necessary emulators from http://www.51degrees.mobi/Products/MobileEmulators/tabid/87/Default.aspx

     

    Why should one download emulators or software development kits from your web site? You can go to the developer sites of the manufacturer of your choice and download the SDKs from there.

    Thursday, September 24, 2009 5:29 AM
  • User1135281112 posted

    Hi SKT

    By the way this is not my website for your information and i am just making easy for user to get different options from one place. If you are so concern than please provide necessary information instead of commenting on other replies. All users are not like us who will first find the information from existing thread but would like to start there own thread and get all details over there so that its easy for them.

    isMobileDevice is not able to trace many sets of mobile devices. How many devices you have tested with this property? The code what you have written should be applied to the existing .aspx web pages to redirect users.

    The sample code what i have provided just have a look at that there is no need to change existing .aspx web pages, it automatically detects and redirects the user to mobile landing page by just defining in web.config. Apart from this it also provides detailed information of the capabilities of mobile device making request, which can be handy for customizing the pages for the mobile devices.

    You can review my latest article at http://dotnetslackers.com/articles/aspnet/Mobile-Device-Detection-and-Redirection-Using-ASP-NET.aspx which gives all detailed information about the sample what i have loaded here.

    Thanks

    Thursday, September 24, 2009 6:04 AM
  • User-180320890 posted

    i remove it because all is wrong


    Thursday, September 24, 2009 6:54 AM
  • User1634317999 posted

    isMobileDevice is not able to trace many sets of mobile devices. How many devices you have tested with this property? The code what you have written should be applied to the existing .aspx web pages to redirect users.

    You have to use the Mobile Device Browser File or your own browser definitions - hard work and only for bigger projects - to cover the bigger part of mobile phones and browsers.

    The sample code what i have provided just have a look at that there is no need to change existing .aspx web pages, it automatically detects and redirects the user to mobile landing page by just defining in web.config. Apart from this it also provides detailed information of the capabilities of mobile device making request, which can be handy for customizing the pages for the mobile devices.

    It's a common pratice to use HTTP modules in ASP.NET web applications. And you can use the code above in such a module and it redirects all users to the right page without changing individual .aspx pages.

    i am just making easy for user to get different options from one place.

    I think it is better to use the SDKs from the software and device manufacturers because I don't know how to test mobile web applications for iPhone, new S40, S60 oder Windows Mobile with the outdated Openwave emulator.

    Thank you. 

     

     

    Thursday, September 24, 2009 7:13 AM
  • User1634317999 posted

    most of mobile browser does not support http or ftp they support only WAP protocol

    ... and most of the nonsense in this mobile web development forum stems from India ... 

     

    Thank you

    Thursday, September 24, 2009 7:19 AM
  • User981004358 posted

    Usage of Mobile development is made quite easy by using 51degrees.mobi Foundation .NET open source API. The advantage of  using this open source would be

    - API is written specifically for the ASP.NET platform.
    - Single web address for both traditional and mobile web sites.
    - Directly uses WURFL, the internet's most popular open source mobile device database.
    - Integrates easily with your existing web site.

    51degrees.mobi Foundation API, the .NET open source is now in Codeplex. Downloads are available here http://51degrees.codeplex.com/releases.

    API easily detects if the request is coming from any mobile device and redirects user to mobile landing page. It has some user friendly samples to try out.

    - Thanks 

    Friday, August 13, 2010 10:43 AM
  • User1943143334 posted

    Hi,

     check the link for Mobile web development,

    http://roopeshreddy.spaces.live.com

    And for detecting browser type, check the

    http://mdbf.codeplex.com

    http://www.w3schools.com/js/js_browser.asp

     

    Hope it helps u... 

    Friday, August 13, 2010 11:23 PM
  • User981004358 posted

    Hello,

    Check this for MDBF final update

    http://mdbf.codeplex.com/Thread/View.aspx?ThreadId=219552

     

    - Thank You 

    Tuesday, August 17, 2010 11:20 AM