locked
Mobile beginner's inquiry RRS feed

  • Question

  • User-985624828 posted

    I've developed web applictions in VB in VS2005 pro and want to get started on developing mobile applications in VB now that I've upgraded to VS2010 pro.  It's proving to be more difficult to get off the ground than I expected.  It would seem that there have been several toolkits for developing mobile applications since NET 2.0 -- some obsolete -- and the web refences I've been going through seem to be a mishmash of broken links, circular references and dead ends.

    When I click on toolbox -> choose toolbox items, all of the system.web.ui.mobilecontrols are there.  But they never turn up in my toolbox.  And I can't find a way of beginning a  mobile website project, either.  Nor can I find any examples of mobile ASP.NET development in either the samples included with VS2010 or online at http://msdn.microsoft.com/en-us/vstudio/dd238515.aspx

    My needs are simple: can somebody tell me what additions or configuration changes I need to make to prepare my VS2010 setup for working with ASP.NET 4.0 mobile controls?  And once this is there any good tutorial for learning mobile website develpment that doesn't involve contracting with a third party?  How about a good book for learning the CURRENT techniques for building mobile websites with ASP.NET 4.0?

     

     

    Sunday, July 25, 2010 8:53 PM

Answers

  • User1943143334 posted

    Hi,

    ASP.NET page is parsed by the ISAPI filter and HTML is sent to browser. The beauty of asp.net ISAPI filter is, it will send the HTML based on the requested device.

    If you wish not have VIEWSTATE, you can disable it, with the property EnableViewState at the Page directory.

     

    Regarding your Mobile Phone emulators,

    BlackBerry Provides emulators for almost all the models. iPhone,Android,Nokia does not provide emulators. For display related and all check the links in the blog: http://roopeshreddy.spaces.live.com

    Hope it helps u... 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 30, 2010 6:16 AM
  • User1943143334 posted

    Hi,

    Check the following code,

    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
        <link media="only screen and (max-device-width: 480px)" href="stylesheet.css" type="text/css"/>
        <meta name="viewport" content="width = device-width" />
        
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            Optimized content for iPhone...!
        </div>
        </form>
    </body>
    </html>

     

    For More info, check the following link,

    http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW1
     

    Hope it helps u...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 20, 2010 10:55 AM

All replies

  • User1943143334 posted

    Hi,

     Refer the following link,

    http://roopeshreddy.spaces.live.com/

     

    Hope it helps u...

    Monday, July 26, 2010 8:51 AM
  • User-985624828 posted

    Thank you.  What you suggested was interesting -- especially the Blackberry part -- but it would seem that I have more questions than ever.  Everything about developing mobile web browser applications in ASP.NET using VB in Visual Studio 2010 is so random and disorganized ... I thought that I could just sit down and begin studying with readily-available tutorials and sample code, but this sure hasn't been the case.

    An article like this http://www.codeproject.com/KB/aspnet/Loan_RepaymentCalculator.aspx?msg=3463993 would be perfect, but it's written for Visual Studio 2008 using C#.  I was able to download the "mobile web form" but I couldn't get it to appear with my installed templates.  And there's nothing about mobile forms in the templates that ARE installed in VS2010.  Should I conclude from the absence of any how-to articles for creating mobile web forms using VS2010 & VB that this combo isn't considered a very robust platform for such projects?

     

     

    Wednesday, July 28, 2010 4:42 PM
  • User1943143334 posted

    Hi,

    Developing Mobile Web applications is similar in both VS 2008 and VS 2010. Try creating a ASP.NET Empty Website  instead of  ASP.NET Web Site.

    Now an empty asp.net website is created, without any pages preloaded. Now add .aspx page to the website and start developing like in VS 2008.

    Try creating a WebForm(.aspx) and start coding with the general controls in the Standard section. It will render absolutely fine in the Mobile browsers.

    NOTE: Mobile Web Controls for outdated. Those controls are used to create WAP sites. Now, most of the mobile browsers support HTML. So you go ahead and create general asp.net website and it will work absolutely fine in both Mobile and Desktop browsers.

     

    Hope it helps u... 

    Wednesday, July 28, 2010 9:00 PM
  • User-985624828 posted

    That's useful clarification re the HTML, but isn't there some kind of template, CSS, or "Browse with " object for making it easier to work with smartphone dimensions?  You'd think that there'd be some kind of tools for letting you know what your wesbsite is going to look like on the HTML browser of an iPhone or a Droid without having to compile and upload it.  And won't controls other than standard ones work mobile HTML browsers?  I thought these "run at server" controls returned basic HTML data to the browser.  (Or is it that the _VIEWSTATE overhead becomes too much?) 

    Thursday, July 29, 2010 12:21 PM
  • User1943143334 posted

    Hi,

    ASP.NET page is parsed by the ISAPI filter and HTML is sent to browser. The beauty of asp.net ISAPI filter is, it will send the HTML based on the requested device.

    If you wish not have VIEWSTATE, you can disable it, with the property EnableViewState at the Page directory.

     

    Regarding your Mobile Phone emulators,

    BlackBerry Provides emulators for almost all the models. iPhone,Android,Nokia does not provide emulators. For display related and all check the links in the blog: http://roopeshreddy.spaces.live.com

    Hope it helps u... 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 30, 2010 6:16 AM
  • User-985624828 posted

    OK, I've tried constructing my first mobile-browser web application.  It seems to work, but there are some improvements that I'd definitely like to make to it.  Maybe you've encountered the same problems.  The application is at www.tofilmfest.ca/artsnob.   Here's what I'd like to change:

    As you can see, the first screen comes up scaled to show the whole full-screen web view on the mobile monitor, which makes everything tiny -- you have to manually adjust it to make it readable.  Is there any way that you can make it come up in the desired size and position?

    When you adust the screen size, make choices, and generate a list, the list is displayed on a new page --  again minimized.  Isn't there a way of keeping the screen scaling constant when you call a new page form a page that's been resized? 

    When you have a list displayed and want to return to the data entry screen, pressing the back button on an iPhone works,  However, when you try to do the same thing on a Droid, you just get some cryptic text and have to manually press refresh to get the desired screen.  Do you have any ideas on what makes the behavior different, and if there's a workaround?

    Thanks for any help you can provide.  I hope that these are simple problems.

    Monday, August 16, 2010 1:22 PM
  • User981004358 posted

    Hello,

    To experience the hang of detecting Mobile devices using ASP.NET you can use 51degrees.mobi Foundation API which detects all mobile devices. It is a .NET open source available here http://51degrees.codeplex.com/releases.

    It 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.

     

    - Thank You

    Tuesday, August 17, 2010 11:16 AM
  • User-985624828 posted

    Thanks, but my concern is not with detecting mobile browsers but rather with the "landing zone" itself.  I want the web page opened so that a 400px-wide rectangle at the top left of the web page is filling the viewing area of the smartphone browser.  I also want additional pages called from the first page to remain identically scaled.

     

     

    Wednesday, August 18, 2010 7:56 AM
  • User1943143334 posted

    Hi,

     Refer the following link,

    http://roopeshreddy.spaces.live.com/

     

    Check the links in the above link. For iPhone and BlackBerry, there are some meta tags to be inserted in the head portion of the HTML file. Check the above link for rendering content in different mobile phones.

     

    Hope it helps u..

    Thursday, August 19, 2010 1:45 AM
  • User-985624828 posted

    Not much luck finding anything useful.  Tell me something: Have you been able to overcome this scaling nuisance with your own mobile websites?   Can you point me to a webiste you've written that will appear properly-sized on an iPhone or a Droid upon first load?  If so, what meta tags did you use?

    Thursday, August 19, 2010 6:06 PM
  • User1943143334 posted

    Hi,

    Check the following code,

    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
        <link media="only screen and (max-device-width: 480px)" href="stylesheet.css" type="text/css"/>
        <meta name="viewport" content="width = device-width" />
        
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            Optimized content for iPhone...!
        </div>
        </form>
    </body>
    </html>

     

    For More info, check the following link,

    http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW1
     

    Hope it helps u...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 20, 2010 10:55 AM
  • User-985624828 posted

    Thanks, that was exactly the tip I needed.  I finally have it working with no manual scaling required!  I've marked your reply as the answer.  You should definitely include this example on your blog.

     

     

    Sunday, August 22, 2010 12:03 AM
  • User-985624828 posted

    Follow-up question:  Once a page has been used with the viewpoint tag, can it ever be UN-viewpointed?  I thought that I could resume color compatibility for a normal browser just by commenting out lines 8 & 9; but it seems that nothing I do can make any difference in resolving the problem I have of alternate gridview rows not displaying properly in a normal browser.  The page continues to display the way it does with the lines included, which is completely different from the (proper) iPhone display.  I went so far as to make sure it had nothing to do with caching on my browser and also ran it in an alternate browser.  Have you encountered these color differences between normal and mobile browsers before?  Can you make a copy of one of your viewpoint-enabled projects that employs a gridview with alternate rows and edit the copy to display properly in a normal full-screen browser?  If so, what's the tricik?  What did I miss?

     

     

    Sunday, August 29, 2010 12:31 AM