1.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment.

You need to ensure that when you click the btnSubmit Button control, each Label control value is asynchronously updatable.
Which code segment should you use?
2.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web form by using ASP.NET AJAX.
You write the following client-script code fragment to handle the exceptions thrown from asynchronous postbacks. (Line numbers are included for reference only.)
01
You need to ensure that the application performs the following tasks:
Use a common clien-script function named errorHandler.
Update a Label control that has an ID named lblEror with the error message.
Prevent the browser from displaying any message box or Javascript error
What should you do?
3.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application consumes a Microsoft Windows Communication Foundation (WCF) service.
The WCF service exposes the following method.
[WebInvoke]
string UpdateCustomerDetails(string custID);
The application hosts the WCF service by using the following code segment.
WebServiceHost host = new WebServiceHost(typeof(CService), new Uri("http://win/"));
ServiceEndpoint ep = host.AddServiceEndpoint(typeof(ICService), new WebHttpBinding(), "");
You need to invoke the UpdateCustomerDetails method.
Which code segment should you use?
4.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You add a Web form that contains the following code fragment.

You write the following code segment for the GetData method of the DAL class. (Line numbers are included for reference only.)
01 public object GetData() {
02 SqlConnection cnn = new SqlConnection();
03 string strQuery = "SELECT * FROM Products";
05 }
You need to ensure that the user can use the sorting functionality of the gvProducts GridView control.
Which code segment should you insert at line 04?
5.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web page to display photos and captions. The caption of each photo in the database can be modified by using the application.
You write the following code fragment.

When you access the Web page, the application throws an error.
You need to ensure that the application successfully updates each caption and stores it in the database.
What should you do?
6.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application consumes an ASMX Web service. The Web service is hosted at the following URL.
http://www.contoso.com/TemperatureService/Convert.asmx
You need to ensure that the client computers can communicate with the service as part of the configuration.
Which code fragment should you use?
7.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You define the following class.
public class Product {
public decimal Price { get; set; }
}
Your application contains a Web form with a Label control named lblPrice.



You use a StringReader variable named xmlStream to access the following XML fragment.

35

You need to display the price of the product from the XML fragment in the lblPrice Label control.
Which code segment should you use?
8.
You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.
You create an ASMX Web service in the application by using the following code segment.
(Line numbers are included for reference only.)
01 [WebService(Namespace = "http://adatum.com/")]
02 [ScriptService]
03 public class PaymentService : WebService
04 {
06 [WebMethod]
08 public XmlDocument GetPaymentInformation()
09 {
10 XmlDocument payment = Payment.GetPaymentInfo();
11 return payment;
12 }
13 }
You plan to invoke the PaymentService object from the client-script object by using ASP.NET AJAX. You need to ensure that the client-script object that is retrieved from the Web service represents a valid XmlDocument object.
Which code segment should you insert at line 07?
9.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
All the content pages in the application use a single master page. The master page uses a static navigation menu to browse the site.
You need to ensure that the content pages can optionally replace the static navigation menu with their own menu controls.
What should you do?
10.
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
To add a Calendar server control to a Web page, you write the following code fragment.

You need to disable the non-week days in the Calendar control.
What should you do?