Microsoft TS: Microsoft .NET Framework 2.0 - Web-based Client Development - 70-528 Exam Practice Test

Question 1
You are creating a Microsoft ASP.NET Web site.
You need to ensure that the Web site uses cookieless authentication.
Which code fragment should you add to the Web.config file of the Web site?

Correct Answer: D
Question 2
You create a Web site to use a Microsoft ASP.NET membership provider. You create the following roles: Admin, Manager, and Employee.
The Web page contains the following code fragment.
<asp:LoginView id="LoginView1" runat="server">
<RoleGroups>
<asp:RoleGroup Roles="Admin">
<ContentTemplate>
You are logged in as an administrator.
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView
You need to display a message to authenticated users even if a RoleGroup has not been defined for their role.
Which code fragment should you add to the LoginView control?

Correct Answer: B
Question 3
You create a Web application for your company's intranet. You want to enable users to customize their versions of the intranet home page.
You create sections of content as Web Parts.
You need to ensure that users can customize content at any time.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)

Correct Answer: B,D
Question 4
You are creating a composite control for capturing user address information in a Web application. You
define a number of properties that the user can set at design time.
You need to group these properties in the Properties dialog box.
In addition, you need to ensure that when users click on a particular property, they receive a short
explanation of that property.
The properties are shown in the exhibit. (Click the Exhibit button.)

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

Correct Answer: C,D
Question 5
You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the
database.
When the user clicks the Update button on the FormView control, the application must validate that the
user has entered data in all of the fields.
You need to ensure that the Web Form does not update if the user has not entered data in all of the fields.
Which code segment should you use?

Correct Answer: B
Question 6
You are creating a Microsoft ASP.NET solution.
The solution allows you to browse the Internet on mobile devices.
The solution contains the following elements:
A DataSet object named ds
A form named frmResult
An ObjectList control named Result in frmResult
You write the following code segment. (Line numbers are included for reference only.)
01 Public Sub ShowResults()
02 Result.DataSource = ds.Tables("Products").DefaultView
03 Result.LabelField = "ProductName"
05 Me.ActiveForm = frmResult
06 End Sub
You need to ensure that data contained in the DataSet object is displayed in the form.
Which line of code should you insert at line 04?

Correct Answer: B
Question 7
Your Web site processes book orders. One of the application methods contains the following code segment.
Dim doc As New XmlDocument()
doc.LoadXml("<book><discount>10</discount>" & "<title>Dictionary</title></
book>")
You need to remove the discount element from XmlDocument.
Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

Correct Answer: A,B
Question 8
You are developing a Web application. The Web application uses the following code segment to connect to a database.
conn.ConnectionString = "Server=(local);Initial Catalog=NorthWind;Integrated Security=SSPI;";
You create logins in Microsoft SQL Server for each user of the Web application. When you run the Web
application, you receive the following error message.
"Login failed for user 'COMPUTERNAME\ASPNET'."
You need to resolve this error.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

Correct Answer: A,D