You need to cache the data that the action method returns
You are developing an ASP.Net MVC 2 view and controller.
The controller includes an action method that retrieves rows from a Product table in Microsoft SQL Server
database.
You need to cache the data that the action method returns.
What should you do?
Which code segment should you add at line 03?
You are developing an ASP.NET Web application.
The application includes a Icomparer<string> implementation named CaseInsensitiveComparer that compares
strings without case sensitivity
You add the following method.(Line numbers are included for reference only.)
01 public IEnumerable<string>SortWords(string[] words)
02 {
03
04 }
You need to sort the array by word length and then by alphabetic order, ignoring case.
Which code segment should you add at line 03?
Which two actions should you perform?
You are implementing an ASP.Net web page that includes a Treeview control.
You need to ensure that the TreeView control nodes are populated only when they are first expanded.
Which two actions should you perform? (Each correctanswer presents part of the solution. Choose two.)
Wich code segment should you use?
You are implementing an ASP.NET web application.Theapplication 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? (Eachcontrol presents part of the solution.Choose two.)
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?
You need to ensure that the route is registered correctly, Which code segment should you add?
You are developing an ASP.NET MVC 2 Web Applicationthat 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 routeto use the Display action of the blog controller.
Only page visits with a four digit year, two-digit month and two-digit 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?