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

Research & Comprehension

Instructions

Research these items, write up the results of your research, and come prepared to discuss these topics in class.

Materials to turn in:

  • Lab07 Project Folder
    • default.aspx
    • default.aspx.cs
    • other associated project files

Procedures - Create an ASPX that provides the answers and explanations requested below.

  1. What is a Mobile Form?
    • When do you use them?
       
  2. Do you have to use a specific device (PDA, phone, etc) to access a Mobile Form?
    • How do you design for multiple / different devices?
       
  3. How are ASP.NET Mobile Controls different from Web Controls?
     
  4. What is Adaptive Rendering?
     

  5. You are creating an ASP.NET application that accesses a SQL Server 2000 database to provide production supervisors with planning data. Supervisors use this application to determine workload and to schedule necessary personnel.

    At the top of the main page, the application needs to display the total number of orders received for the day. You create a SqlConnection object and open the connection. Then, you create a SqlCommand object, named cmdDailyOrders, and set the CommandText property to:

    SELECT COUNT(*) FROM Order WHERE YEAR(Order.OrderDate) = YEAR(GETDATE()) AND MONTH(Order.OrderDate) = MONTH(GETDATE()) AND DAY(Order.OrderDate) = DAY(GETDATE())

    You want to return the result to the page using the most efficient approach.
     
    • Write the line of code that uses the most efficient Execute method.
       
    • There are three Execute Command methods. List each one, followed by an explanation of the purpose of each one, what data it returns, if any, and give an example SQL statement that could be used with each one.
       

  6. Your company is creating a new online presence for itself. You are part of the team developing the ASP.NET application. The layout for most pages includes a standard page header with a corporate logo, a single-level menu, and some simple graphics. The header is being designed by a graphic arts consultant. You will incorporate the header into most of your pages. Your project sponsor has requested the ability to easily change the look of the header (e.g., for special time-of-year graphics such as Christmas trees and candy canes in December) with as little programmer, webmaster, and system administrator involvement as possible.

    The header is essentially static content to be included in many different .aspx pages and would be a good candidate for fragment caching.

    How should your team plan to incorporate the header when the graphic designer passes it off to you?

    A) as an XML Web service
    B) as a Web user control in an .ascx file
    C) as clear text in a SQL Server database
    D) as a data blob in a SQL Server database
    E) as a Web custom control in an .ascx file

    • Write which of the options is the correct response.
    • Explain why it is the correct response.
    • AND, explain why each of the others is not the correct response.
       

  7. Your Web application is intended to be used concurrently on multiple servers. When a user visits the application’s home Web form, the user will submit his name and address. This information must be available to whichever instance of the application the user is connected to when he navigates to other web forms. You would like all of this information stored on a server, and you are very concerned with security.

    Which is the best method to store this information?

    A) Use cookies to store the information.
    B) Use ViewState to store the information.
    C) Store the information as Session state.
    D) Store the information as Application state.

    • Write which of the options is the correct response.
    • Explain why it is the correct response.
    • AND, explain why each of the others is not the correct response.
       

  8. You are getting ready to deploy your web application to the server, and you will be using the XCOPY method. You must ensure that the correct files are placed into the correct folders. Your application will use its own configuration information, so you will be including a web.config file with your application.

    To which folder should this web.config file be copied?

    A) The wwwroot folder
    B) The application’s root folder
    C) The bin folder under the wwwroot folder
    D) The bin folder under the application’s root folder

    • Write which of the options is the correct response.
    • Explain why it is the correct response.
    • AND, explain why each of the others is not the correct response.
       

  9. You recently developed and are beta testing a new ASP.NET application. The application contains a page that uses a SqlDataAdapter to manage data retrieved from the Product table in your Microsoft SQL Server 2000 database. One of the columns in the underlying Product table, ProdType, contains a NOT NULL constraint.

    Your page contains a DataGrid that allows users to display and update multiple rows of data at a time. The user can update these fields in the DataGrid: ProdDescription, ProdType, Price, and Category. The user makes the appropriate updates in the grid and then submits the page.

    While testing the page, you notice that if you leave the ProdType field blank an error occurs. You would like to be able to identify the errors that occur, but you do not want the updates that are valid to be interrupted. Instead, you would like all updates that are valid to be performed.

    What should you do before calling the Update method?

    A) Set the ContinueUpdateOnError property of the SqlDataAdapter to true
    B) Set the MissingSchemaAction of the SqlDataAdapter to MissingSchemaAction.Ignore
    C) Set the MissingMappingAction of the SqlDataAdapter to MissingMappingAction.Ignore
    D) Set the MissingMappingAction of the SqlDataAdapter to MissingMappingAction.Passthrough

    • Write which of the options is the correct response.
    • Explain why it is the correct response.
    • AND, explain why each of the others is not the correct response.
       

Grading

#1 -2 max
#2 -2 max
#3 -2 max
#4 -2 max
#5 -4 max
#6 -4 max
#7 -4 max
#8 -4 max
#9 -4 max
Total 28 pts possible