PrepAway - Latest Free Exam Questions & Answers

Category: 70-562

Exam 70-562: TS: Microsoft .NET Framework 3.5, ASP.NET Application Development

What additional step should you perform?

You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.
You use Windows Authentication for the application. You set up NTFS file system permissions for the Sales group to access a particular file. You discover that all the users are able to access the file.
You need to ensure that only the Sales group users can access the file.
What additional step should you perform?

Which code segment should you insert at line 02?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a class that implements the IHttpHandler interface. You implement the ProcessRequest method by using the following code segment. (Line numbers are included for reference only.)

01 Public Sub ProcessRequest(ctx As HttpContext)
02
03 End Sub

You need to ensure that the image named Alert.jpg is displayed in the browser when the handler is requested.
Which code segment should you insert at line 02?

Which code fragment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code segment to create a class named MultimediaDownloader that implements the IHttpHandler interface.

Namespace Contoso.Web.UI
Public Class MultimediaDownloader
Implements IHttpHandler
‘…
End Class
End Namespace

The MultimediaDownloader class performs the following tasks:
It returns the content of the multimedia files from the Web server It processes requests for the files that have the .media file extension The .media file extension is mapped to the aspnet_isapi.dll file in Microsoft IIS 6.0.
You need to configure the MultimediaDownloader class in the Web.config file of the application.
Which code fragment should you use?

Which code segment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web page named enterName.aspx. The Web page contains a TextBox control named txtName. The Web page cross posts to a page named displayName.aspx that contains a Label control named lblName.
You need to ensure that the lblName Label control displays the text that was entered in the txtName TextBox control.
Which code segment should you use?

Which code segment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application runs on Microsoft IIS 6.0.
You create a page named oldPage.aspx.
You need to ensure that the following requirements are met when a user attempts to access the page:
The browser diplays the URL of the oldPage.aspx page.
The browser displays the page named newPage.aspx Which code segment should you use?

Which line of code should you insert in the constructor of the page?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a page that contains the following code fragment.
<asp:ListBox ID="lstLanguages"AutoPostBack="true" runat="server" />

You write the following code segment in the code-behind file for the page.

Private Sub BindData(sender As Object, e As EventArgs)
lstLanguages.DataSource = CultureInfo.GetCultures(CultureTypes.AllCultures)
lstLanguages.DataTextField = "EnglishName"
lstLanguages.DataBind()
End Sub

You need to ensure that the lstLanguages ListBox control maintains the selection of the user during postback.
Which line of code should you insert in the constructor of the page?

Which code segment should you insert in the constructor of the page?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a page that contains the following control.
<asp:Calendar EnableViewState="false"ID="calBegin" runat="server" />
You write the following code segment in the code-behind file for the page.

Private Sub LoadDate(sender As Object, e As EventArgs)
If IsPostBack Then
calBegin.SelectedDate = DirectCast(ViewState("date"), DateTime)
End If
End Sub
Private Sub SaveDate(sender As Object, e As EventArgs)
ViewState("date") = calBegin.SelectedDate
End Sub

You need to ensure that the calBegin Calendar control maintains the selected date.
Which code segment should you insert in the constructor of the page?

Which code segment should you insert at line 13?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web page that has a GridView control named GridView1. The GridView1 control displays the data from a database named Region and a table named Location.
You write the following code segment to populate the GridView1 control. (Line numbers are included for reference only.)

01Protected Sub Page_Load(sender As Object, e As EventArgs)
02 Dim connstr As String
03
04 SqlDependency.Start(connstr)
05 Using connection As New SqlConnection(connstr)
06 Dim sqlcmd As New SqlCommand()
07 Dim expires As DateTime = DateTime.Now.AddMinutes(30)
08 Dim dependency As New SqlCacheDependency("Region", "Location")
09 Response.Cache.SetExpires(expires)
10 Response.Cache.SetValidUntilExpires(True)
11 Response.AddCacheDependency(dependency)
12 sqlcmd.Connection = connection
13
14 GridView1.DataSource = sqlcmd.ExecuteReader()
15 GridView1.DataBind()
16 End Using
17 End Sub

You need to ensure that the proxy servers can cache the content of the GridView1 control.
Which code segment should you insert at line 13?

Which code segment should you insert at line 03?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a custom Web user control named SharedControl. The control will be compiled as a library.
You write the following code segment for the SharedControl control. (Line numbers are included for reference only.)

01 Protected Overrides Sub OnInit(e As EventArgs)
02 MyBase.OnInit(e)
03
04 End Sub

All the master pages in the ASP.NET application contain the following directive.
<%@ Master Language="C#" EnableViewState="false" %>
You need to ensure that the state of the SharedControl control can persist on the pages that reference a master page.
Which code segment should you insert at line 03?


Page 5 of 8« First...34567...Last »