<%@LANGUAGE="VBSCRIPT" %> <% Response.CacheControl = "no-cache" %>
Lab 9

Mobile Forms

Instructions

This lab will give you experience with detecting and generating mobile forms for handheld devices using ASP.NET

Procedures

  1. Two major problems for web developers are based on requested device, redirecting users to the Mobile site or General Site. And, fetching the Browser capabilities.
     
  2. Detecting: Create an aspx that detects whether the user should be redirected to the mobile site or to the standard site.
    • Here is some code to get you started. It is difficult to test all possibilities unless you know people with all types of devices, but at some point, that is exactly how you would test.
  3. Browser Capabilities included in .NET 4
    • Here are the .NET 4 browser definition files.
    • You may not actually need to do this in .NET 4, but if you wanted to include new broswer definitions in your code, you would need to create an App_Browsers folder in your solution and copy the .browser files into it. Refresh your solution explorer to see the new files. Note: do not copy the default.browser file. It is already available within the .net framework.
    • Here is some useful information about browser definitions, it talks about using with .NET 3.5 but it also explains how they work within .NET 4 and provides a couple examples of code.
       
  4. Create an aspx for the mobile site.
    • Constrain the width of the site to 220 pixels.
      • In the future, you may decide to have more options, perhaps an iphone uses a certain width, android uses a certain width, ipad uses a certain width, other phones use a certain width.
    • Provide a listing of 10 baseball games that were played in the past week (use espn).
    • Provide a link to view the standard site (always provide this because some people actually want the full site)
    • Each listing should be a link to the details about that game.
    • Provide the:
      • Team names
      • Team Logos
      • Team records
      • Game day / date
      • Game time
      • Game Location
      • Who was pitching for each team
      • Each pitcher's win-loss record
    • Provide a link back to the main form
       
  5. Create an aspx for the standard site.
    • Create the site at a standard width.
    • You could arrange the box scores on one page if you choose.
       

Grading

Coding & Functionality -20 max
   
Total 20 pts possible