最新的Microsoft TS: Microsoft .NET Framework 2.0 - Web-based Client Development - 070-528免費考試真題
問題1
You are developing a Microsoft ASP.NET Web site.
Users must be able to select a page layout of their choice.
You need to ensure that the master page can be dynamically applied.
Which code segment should you use?
You are developing a Microsoft ASP.NET Web site.
Users must be able to select a page layout of their choice.
You need to ensure that the master page can be dynamically applied.
Which code segment should you use?
正確答案: B
問題2
You are developing a Microsoft ASP.NET application that includes a Web content Form based on one of the master pages of the application.
The Web content Form includes a drop-down list control. You select the drop-down list control in Microsoft
Visual Studio Designer.
You need to create an event handler when the item selected in the drop-down list control changes.
What should you do?
You are developing a Microsoft ASP.NET application that includes a Web content Form based on one of the master pages of the application.
The Web content Form includes a drop-down list control. You select the drop-down list control in Microsoft
Visual Studio Designer.
You need to create an event handler when the item selected in the drop-down list control changes.
What should you do?
正確答案: A
問題3
You are developing a Web application that has two distinct UIs. One UI is targeted to desktop browsers.
The other UI is targeted to mobile devices. The mobile devices might or might not support cookies and relative URLs.
Users request the Default.aspx page.
You need to redirect users to the appropriate UI, depending on whether they are using a mobile device or a desktop browser.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
You are developing a Web application that has two distinct UIs. One UI is targeted to desktop browsers.
The other UI is targeted to mobile devices. The mobile devices might or might not support cookies and relative URLs.
Users request the Default.aspx page.
You need to redirect users to the appropriate UI, depending on whether they are using a mobile device or a desktop browser.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
正確答案: C,D
問題4
You are developing an application that extracts data from a database.
You need to close the database connections that are open even when exceptions occur.
Which code segment should you use?
You are developing an application that extracts data from a database.
You need to close the database connections that are open even when exceptions occur.
Which code segment should you use?
正確答案: B
問題5
You are creating a Web application.
The Web application has a Web Form that contains a data grid named DgCustomers. You set the Web Form as asynchronous.
You write the following code segment in the code-behind file of the application.
Public Partial Class _Default Inherits System.Web.UI.Page Private connection As SqlConnection Private command As SqlCommand Private reader As SqlDataReader Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) AddOnPreRenderCompleteAsync(New BeginEventHandler(BeginAsyncOperation), New EndEventHandler(EndAsyncOperation)) End Sub End Class
You need to retrieve and bind data from the Customers table. You also need to ensure that Web requests are not blocked during database operation.
Which two code segments should you add to the code-behind file of the Web Form? (Each correct answer presents part of the solution. Choose two.)
You are creating a Web application.
The Web application has a Web Form that contains a data grid named DgCustomers. You set the Web Form as asynchronous.
You write the following code segment in the code-behind file of the application.
Public Partial Class _Default Inherits System.Web.UI.Page Private connection As SqlConnection Private command As SqlCommand Private reader As SqlDataReader Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) AddOnPreRenderCompleteAsync(New BeginEventHandler(BeginAsyncOperation), New EndEventHandler(EndAsyncOperation)) End Sub End Class
You need to retrieve and bind data from the Customers table. You also need to ensure that Web requests are not blocked during database operation.
Which two code segments should you add to the code-behind file of the Web Form? (Each correct answer presents part of the solution. Choose two.)
正確答案: A,C
問題6
You are modifying an existing Microsoft ASP.NET application.
You write the following code fragment for an ASP.NET Web Form. (Line numbers are included for reference only.)
01 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
02 <html xmlns="http://www.w3.org/1999/xhtml">
03 <body>
04 <form id="form1" runat="server">
05 <div>
06 <asp:Panel ID="ContainerPanel" runat="server" BorderWidth="1px"
BorderStyle="Solid" BorderColor="Black">
07 Please enter your name and phone number:<br />
08 <asp:Label ID="NameLabel" runat="server" AssociatedControlID="NameTextBox"
Text="Name:" />
09 <asp:TextBox ID="NameTextBox" runat="server" /><br />
10 <asp:Label ID="PhoneLabel" runat="server"
AssociatedControlID="PhoneTextBox" Text="Phone:" />
11 <asp:TextBox ID="PhoneTextBox" runat="server" /><br />
12 <asp:Button ID="SaveButton" runat="server" Text="Save"
OnClick="SaveButton_Click" />
13 </asp:Panel>
14 </div>
15 </form>
16 </body>
17 </html>
18 <script runat="server">
19 Protected Sub SaveButton_Click(ByVal sender As Object, ByVal e As
EventArgs)
20 ' Code to save the user's name and phone number.
21 End Sub
23 </script>
You need to copy the relevant portions of the Web Form to a new ASP.NET Web user control.
Which range of line numbers should you copy to the Web user control?
You are modifying an existing Microsoft ASP.NET application.
You write the following code fragment for an ASP.NET Web Form. (Line numbers are included for reference only.)
01 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
02 <html xmlns="http://www.w3.org/1999/xhtml">
03 <body>
04 <form id="form1" runat="server">
05 <div>
06 <asp:Panel ID="ContainerPanel" runat="server" BorderWidth="1px"
BorderStyle="Solid" BorderColor="Black">
07 Please enter your name and phone number:<br />
08 <asp:Label ID="NameLabel" runat="server" AssociatedControlID="NameTextBox"
Text="Name:" />
09 <asp:TextBox ID="NameTextBox" runat="server" /><br />
10 <asp:Label ID="PhoneLabel" runat="server"
AssociatedControlID="PhoneTextBox" Text="Phone:" />
11 <asp:TextBox ID="PhoneTextBox" runat="server" /><br />
12 <asp:Button ID="SaveButton" runat="server" Text="Save"
OnClick="SaveButton_Click" />
13 </asp:Panel>
14 </div>
15 </form>
16 </body>
17 </html>
18 <script runat="server">
19 Protected Sub SaveButton_Click(ByVal sender As Object, ByVal e As
EventArgs)
20 ' Code to save the user's name and phone number.
21 End Sub
23 </script>
You need to copy the relevant portions of the Web Form to a new ASP.NET Web user control.
Which range of line numbers should you copy to the Web user control?
正確答案: C