| 1)
|
You write a logging function for a Web Form. You call the logging function from the Page_Unload event handler. You test the Web Form and notice that the Page_Unload event handler does not call the logging function. You need to ensure that the logging function is called. What are two possible ways to achieve this goal? |
|
|
| 2)
|
You create a Web site that stores users' active themes in user profile objects. You need to apply users' preferred themes when they log on to the Web site. What should you do? |
|
|
| 3)
|
You are deploying a Web site to a server managed by a hosting company. The only access you have to the server is through FTP. You need to precompile and deploy the Web site without its source files. What should you do? |
|
|
| 4)
|
You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.)
01 Dim dt As New DataTable("Products")
02 dt.Columns.Add(New DataColumn("Price", _ GetType(Decimal)))
03 dt.Columns.Add(New DataColumn("Quantity", _ GetType(Int32)))
04 Dim dc As DataColumn = New DataColumn("Total", _ GetType(Decimal))
05 dt.Columns.Add(dc)
|
|
You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? |
| 5)
|
You develop a Web control. The Web control consists of labels and associated text boxes. You need to ensure that the Web control has both toolbox and visual designer support. What should you do? |
|
|
| 6)
|
You develop a Web application. Your application contains two settings in the Web.config file. You deploy your application to production. You need to modify the application settings in the production environment without manually editing the XML markup in the Web.config file. What should you do? |
|
|
| 7)
|
You are developing a Web application to display products. Products are displayed on different pages on your Web site. You want to create a user control to manage the display of products. You need a default visual implementation of the UI of the user control. In addition, you need to provide developers with the flexibility to change the layout and controls of the UI. Which three actions should you perform? |
|
|
| 8)
|
You create a Web Form. The Web Form allows users to log on to a Web site. You implement the login logic using a Login control named Login1. The membership data for the application is stored in a SQL Express database in the App_Data directory. You need to configure your application so that the membership data is stored in a local Microsoft SQL Server database. You add the following code segment to the Web.config file. connectionStringName="MySqlProviderConnection"/> Which two additional actions should you perform? |
|
|
| 9)
|
You create a master page named Parent.master that contains a global header for your Web application. You add a ContentPlaceHolder to Parent.master by using the following code segment. <asp:ContentPlaceHolder ID="pagebody" runat="server" />
You also create a content page named Article.aspx by using the following code segment.
<%@ Page Language="C#" MasterPageFile="~/navigation.master"%>
<asp:Content ContentPlaceHolderID="article" Runat="Server">
Article content to go here</asp:Content> You need to create a child master page that contains the navigation for each section. The users must be able to see the header, the navigation, and the article when they view the page, as shown in the exhibit. Which code segment should you use? |
|
|
| 10)
|
You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.)
01 Dim dt As New DataTable("Products")
02 dt.Columns.Add(New DataColumn("Price", _GetType(Decimal)))
03 dt.Columns.Add(New DataColumn("Quantity", _GetType(Int32)))
04 Dim dc As DataColumn = New DataColumn("Total", _GetType(Decimal))
05 dt.Columns.Add(dc)
You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? |
|
|