PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

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 order should the binding stack be configured?

You are creating a Windows Communication Foundation (WCF) service. You have the
following requirements: Messages must be sent over TCP. The service must support
transactions. Messages must be encoded using a binary encoding. Messages must be
secured using Windows stream-based security. You need to implement a custom binding
for the service. In which order should the binding stack be configured?