Exercise 3: Test the Mobile Web Part

In this exercise, you will test the mobile Web Part to ensure that it is rendering different views for each browser. You will notice that different functionality can be presented depending on the type of browser the user is using.

Task 1 – Testing the Web Part in the Browser

  1. With the browser open to your site, the Web Part should still be present on the test home page.

    Figure 3

    The custom web part rendered in a regular browse.

  2. Change the browser to Mobile view by adding ?mobile=1 to the query string. The page should refresh in mobile mode. The Web Part should be visible above the Welcome message as shown in Figure 4.

    Figure 4

    The custom mobile view of the web part

  3. Click the arrow image next to the Web part title and the Web Part will display the text from the mobile adapter.

    Figure 5

    The Mobile content displayed

  4. Close the browser to end the Visual Studio debugging session.