PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

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?

What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You add a Web page named HomePage.aspx in the application. The Web page
contains different controls.You add a newly created custom control named CachedControl to
the Web page. You need to ensure that the following requirements are met:
The custom control state remains static for one minute.
The custom control settings do not affect the cache settings of other elements in the Web page.
What should you do?

What should you do?

You create a logging utility class by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The class writes logs to event log services. You need to ensure that the client applications that use the class can create an instance of the class only if they have permissions to write to the event log services. What should you do?

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 Default.aspx in the root of the application.
You add an ImageResources.resx resource file in the App_GlobalResources folder. The ImageResources.resx file contains a localized resource named LogoImageUrl.
You need to retrieve the value of LogoImageUrl. Which code segment should you use?

Which line of code should you insert at line 08?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET.You write the following code segment. (Line numbers are included for reference
only.)
01 DataTable dt = new DataTable();
02 dt.Columns.Add(“number”);
03 dt.Columns.Add(“string”);
04 dt.Rows.Add(1, “3”);
05 dt.Rows.Add(2, “2”);
06 dt.Rows.Add(3, “1”);
07 var result = from p in dt.AsEnumerable()
08
09 foreach (var number in result) {
10 Console.Write(number.ToString());
11 }
You need to display the string “321”.Which line of code should you insert at line 08?

What should you do?

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The application exposes a Windows Communication Foundation (WCF) Web service. The Web service is consumed by third-party applications. You need to ensure that the WCF service provides interoperable and secure end-to-end communications. What should you do?

Which control should you include in Form1?

You created a custom ASPX page that updates a list. The page is deployed to the _layouts folder.

The page contains the following code segment. (Line numbers are included for reference only.)

01 <form id=”Form1″ runat=”Server”>
02 <asp:Button id=”btnUpdate” runat=”server” Text=”Update”></asp:Button>
03 </form>

A user attempts to update the list by using the page and receives the following error message: “The security validation for this page is invalid”.

You need to prevent the error from occurring.

Which control should you include in Form1?

What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.

The application uses 10 themes and allows the users to select their themes for the Web page.

When a user returns to the application, the theme selected by the user is used to display pages in the application. This occurs even if the user returns to log on at a later date or from a different client computer.

The application runs on different storage types and in different environments.

You need to store the themes that are selected by the users and retrieve the required theme.

What should you do?