PrepAway - Latest Free Exam Questions & Answers

Category: 70-515 (v.3)

Exam 70-515: TS: Web Applications Development with Microsoft .NET Framework 4 (update October 26th, 2015)

Which two actions should you perform?

You are developing an ASP.NET Web page.
You add the following markup to the page.
<asp:FileUpload id=”FileUpload1″ runat=”server” />
<asp:Button id=”btnUpload” Text=”Upload selected file”
OnClick=”btnUpload_Click” runat=”server” />
<asp:Label id=”lblFeedback” runat=”server” />

You add the following code segment to the code-behind. (Line numbers are included for reference
only.)
01 Protected Sub btnUpload_Click(ByVal sender As Object,
02 ByVal e As EventArgs) Handles btnUpload.Click
03 If () Then
04 Dim saveName As String =
05 Path.Combine(“c:\uploadedfiles\”,
06 FileUpload1.FileName)
07
08 lblFeedback.Text = “File successfully uploaded.”
09 Else
10 lblFeedback.Text = “File upload failed.”
11 End If
12
13 End Sub
You need to save the uploaded file and display a message to the user that indicates that the upload
either succeeded or failed. Which two actions should you perform? (Each correct answer presents
part of the solution. Choose two.)

Which two actions should you perform?

You create a Web page named TestPage.aspx and a user control named TestUserControl. ascx.
TestPage.aspx uses TestUserControl.ascx as shown in the following line of code.
<uc:TestUserControl ID=”testControl” runat=”server”/>
On TestUserControl.ascx, you need to add a read-only member named CityName to return the value
“New York”. You also must add code to TestPage.aspx to read this value. Which two actions should
you perform? (Each correct answer presents part of the solution. Choose two.)

You need to configure the panels to meet the requirements

You are implementing an ASP.NET AJAX page. You add two UpdatePanel controls named pnlA and
pnlB. pnlA contains an UpdatePanel control named pnlAInner in its content template. You have the
following requirements. Update panels pnlA and pnlB must refresh their content only when controls
that they contain cause a postback. Update panel pnlAInner must refresh its content when controls
in either pnlA or pnlB or pnlAInner cause a postback. You need to configure the panels to meet the
requirements. What should you do?

Which code segment should you use?

A Web service returns a list of system users in the following format.
<?xml version=”1.0″ ?>
<users>
<user id=”first”>
<name>Name of first user</name>
<email>first@contoso.com</email>
</user>
<user id=”second”>
<name>Name of second user</name>
<email>second@contoso.com</email>
</user>
</users>
You need to populate a drop-down menu with the IDs and names of the users from the Web service,
in the order provided by the service. Which code segment should you use?

What should you set the ClientIDMode property of the DropDownList to?

You are developing an ASP.NET Web page. You add a data-bound GridView control. The GridView
contains a TemplateField that includes a DropDownList. You set the GridViews ClientIDMode
property to Static, and you set the ClientIDRowSuffix property to ProductID. You need to be able to
reference individual DropDownList controls from client-side script by using the ProductID. What
should you set the ClientIDMode property of the DropDownList to?

Which declaration should you use?

You create a Web page that contains the following code. (Line numbers are included for reference
only.)
01 <script>
02 function changeColor(c) {
03 document.getElementById(“message”).style.color=c;
04 }
05 </script>
06
07 <p id=”message”>Welcome!</p>
08 <ul id=”color”>
09 <li>Black</li>
10 <li>Red</li>
11 </ul>
You need to ensure that when the user clicks an item in the list, the text color of the Welcome!
message will change. Which declaration should you use?


Page 4 of 26« First...23456...1020...Last »