Online Access Free 70-528 Exam Questions
Exam Code: | 70-528 |
Exam Name: | TS: Microsoft .NET Framework 2.0 - Web-based Client Development |
Certification Provider: | Microsoft |
Free Question Number: | 149 |
Posted: | Sep 05, 2025 |
You write a class to interact with a database. The class uses a SqlConnection instance.
You need to detect when the state of the connection has been modified.
What should you do?
You are creating a Microsoft ASP.NET Web application that allows users to choose a stylesheet theme for a Web page.
The application contains a combo box that is defined by the following code fragment.
<asp:DropDownList ID="cmbThemes" runat="server"> <asp:ListItem Text="Blue" Value="BlueTheme"/> <asp:ListItem Text="Red" Value="RedTheme"/> <asp:ListItem Text="Green" Value="GreenTheme"/> </asp:DropDownList>
You need to apply a stylesheet theme to a Web page when a user selects a theme from the combo box.
Which code segment should you add to the code file of the Web page?
You are creating a Microsoft ASP.NET Web site.
The Web site includes user management pages. The pages are stored in a folder named UserMgt in the root folder of the Web site.
You need to ensure that only users who belong to the administrator role can access the pages.
What should you do?
You are developing a Microsoft ASP.NET application.
You add a templated Web user control to a Web Form by using the following code fragment.
<uc1:MyControl ID="MyControl1" runat="server">
<HeaderTemplate>
<asp:Label ID="HeaderLabel" runat="server" />
</HeaderTemplate>
<BodyTemplate>
<asp:TextBox ID="TemplateTextBox" runat="server" />
</BodyTemplate>
</uc1:MyControl>
You write the following code segment in the Web Form's code-behind file. (Line numbers are included for reference only.)
02 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 04 End Sub
You need to modify the Visible property of the TemplateTextBox control from the Web Form's code-behind file as false.
What should you do?