locked
websites render on web or pocket pc RRS feed

  • Question

  • User-477414647 posted

    I don't know if this is the correct thread, but my company's website is in .net 2.0 using Masterpages.  I would like to design a series of pages from my site to fit for pocket pc.  I would also like to continue developing websites in both capabilities to offer to my clients.  Years ago I was successful with having two websites and the web.config file checked how the user came to the site to automatically switch the site to a pocket pc safe version.  I would like to do the same thing.  I don't mind developing duplicate pages with duplicate content...as long as the web.config file will switch or redirect if there's a pocket pc viewing the site.  BTW, if this helps my site is in VB so I only want a VB solution, not a C#.  I also do not have any code-behind files...so the coding will have to be either in the masterpage files or on the individual pages.

     If there's any other suggestions (outside of css) to do thing automatically, please let me know.  Thanks!

    Saturday, September 29, 2007 2:17 PM

Answers

  • User113421904 posted

    Hi Robert,

    Based on my research, you could probably have two versions of web pages for destop browsers and mobile browsers and redirect to one of them according to browser type:

            if (Request.Browser["IsMobileDevice"] == "true" ) 
            {
                Response.Redirect("MobileDefault.aspx");
            }
            else 
            {
                Response.Redirect("DesktopDefault.aspx");
            }

    http://msdn.microsoft.com/en-us/library/fhhycabe.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 2, 2007 8:41 AM