Free Microsoft 070-528 Exam Dumps Questions & Answers
| Exam Code/Number: | 070-528Join the discussion |
| Exam Name: | TS: Microsoft .NET Framework 2.0 - Web-based Client Development |
| Certification: | Microsoft |
| Free Question Number: | 149 |
| Publish Date: | Jul 28, 2026 |
| # of views: | 2245 |
|
|
|
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 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?
You create a Web application. The Web application enables users to change fields in their personal profiles. Some of the changes are not persisting in the database.
You need to raise a custom event to track each change that is made to a user profile so that you can locate the error.
Which event should you use?
You are creating a Microsoft ASP.NET application.
The application provides a Web portal to purchase tickets online. Many device types will browse the portal.
The portal includes a Web Form that contains a label named Lbl_Edition.
The Web Form contains the following code segment. (Line numbers are included for reference only.)
01 If
03 Then 04 Lbl_Edition.Text = "Mobile Edition" 05 Else 06 Lbl_Edition.Text = "Desktop Edition" 07 End If
You need to ensure that Lbl_Edition displays the correct edition for the device type.
Which line of code should you insert at line 02?
You are developing a Web page that will allow a user to upload a file on your Web site.
You have defined the following file upload control on the Web page.
<asp:FileUpload ID="uploadFile" runat="server" /><br />
<asp:Button ID="btnUploadFile" runat="server"
Text="Upload File"
OnClick="btnUploadFile_Click"/>
You need to verify whether a file has been selected. You also need to save the file to a subfolder named uploads on the Web site.
Which code segment should you use?