Wich code segment should you use?
You are implementing an ASP.NET web application.The application defines the following classes.
public class Person
{
public String Name{get; set;}
publicIList<Address> Addresses{get;set;}
}
public class Address
{
public String AddressType{get; set;}
public string AddressValue{get;set;}
}
The applicaction must generate XML from personList, wich is a collection of Person instances.The
following XML is an example of the schema than the generated XML must use.
<Persons>
<Person Name=”John Doe”>
<Address Email=”John.Doe@contoso.com”/>
<Address AlternativeEmail=”John.Doe@contoso.com”/>
<Address MSNInstanceMessenger=”John.Doe@contoso.com”/>
</Person>
…..
</Persons>
You need to generate the XML. Wich code segment should you use?
<?xml version="1.0" standalone="yes"?
You are developing an ASP.NET web page. The page must display data from XML file named
Inventory.xml. Inventory.xml contains data in the following format.
<?xml version=”1.0″ standalone=”yes”?>
<inventory>
<vehicle Make=”BMW” Model=”M3″ Year=”2005″ Price=”30000″ instock=”Yes”>
<Ratings>….</Ratings>
</Vechicle>
….
</Inventory>
You need to display Vehicle elements that have the inStock attribute set to YES. Wich two controls
should you add to the page? (Each control presents part of the solution.Choose two.)
You need to send the stack trace of any unhandled exceptions to clients as a fault message
You are implementing a Windows Communication Foundation (WCF) service contract
named IContosoService in a class named ContosoService. The service occasionally fails
due to an exception being thrown at the service. You need to send the stack trace of any
unhandled exceptions to clients as a fault message. What should you do?
You need to ensure that all uploaded files are saved to the server within one call to a single event handler
You are creating an ASP.NET web page that contains several FileUpload controls. The page will be
posted to the server after one or more image files are selected for upload. You need to ensure that
all uploaded files are saved to the server within one call to a single event handler. What should you
do?
Which markup should you use?
You are developing an ASP.NET web page that includes a textbox control that has ID txtDate. You
need to ensure that the user enters a valid date in the text box. Which markup should you use?
What should you do?
You are creating a Windows Communication Foundation (WCF) service that accepts
messages from clients when they are started. The message is defined as follows.
<MessageContract()> Public Class Agent Public Property CodeName As String Public
Property SecretHandshake As String End Class You have the following requirements: The
CodeName property must be sent in clear text. The service must be able to verify that the
property value was not changed after being sent by the client. The SecretHandshake
property must not be sent in clear text and must be readable by the service. What should
you do?
Which code segment should you add?
You are developing an ASP.NET MVC 2 Web Application that displays daily blog posts. Visitors access
a blog post page by using a Web address to pass in the year, month, and day -for
example,contoso.com/2010/07/20. The application must register the appropriate route to use the
Display action of the blog controller. Only page visits with a four digit year, two-digit month and twodigit dat can be passed to the action.You need to ensure that the route is registered correctly. Which
code segment should you add?
You need to display Login.ascx in a view
You are developing an ASP.NET MVC 2 application. You create a login user control named login.ascx.
You need to display Login.ascx in a view. What should you do?
You need to ensure that only one copy of the class library exists on the server
You are developing an ASP.NET web application. The application includes a class library named
Contoso.dll that will be used by other ASP.Net applications on the same server. You need to ensure
that only one copy of the class library exists on the server. What should you do?
Wich markup should you use?
You are developing an ASP.NET MVC2 application. You add an area named Admin to the application.
Admin contains a controller class name to MainController. You create a view named Index outside
the Admin area. You need to add a link in the Index view that will call the Default action. Wich
markup should you use?