You create a new ASP.NET MVC 2 Web application. The following default routes are created in the Global.
asax.vb file. (Line numbers are included for reference only.) 01 Shared Sub RegisterRoutes(ByVal routes As
RouteCollection) 03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}") 05 routes.MapRoute(_ "Default",
"{controller}/{action}/{id}",
New With {.controller = "Home", .action = "Index", .id = ""} ) 07 End Sub
You implement a controller named HomeController that includes methods with the following signatures.
Function About() As ActionResult
Function Index() As ActionResult
Function Details(ByVal id As Integer) As ActionResult
You need to ensure that the About action is invoked when the root URL of the site is accessed.
What should you do?
A. At line 04 in the Global.asax.vb file, add the following line of code.routes.MapRoute("Default4Empty", "/",New With {.controller = "Home", .action = "About"})You are implementing an ASP.NET page. Client-side script requires data. Your application includes a class named Person with a Name property of type string.
The code-behind file of the page includes the following code segment.
Public JsonValue As String
Dim people As List(Of Person) = GetPeopleList()
Dim json As JavaScriptSerializer = New JavaScriptSerializer()
You need to use the JavaScriptSerializer class to serialize only the value of the Name property of each item in the people list.
Which code segment should you use?
A. JsonValue = json.Serialize(people.Select(Function(p) p.Name))You are developing an ASP.NET MVC 2 Web application.
A page makes an AJAX request and expects a list of company names in the following format.
["Adventure Works","Contoso"]
You need to write an action method that returns the response in the correct format.
Which type should you return from the action method?
A. AjaxHelperYou are developing an ASP.NET web application. Your designer creates a theme named General for general use in the application.
The designer also makes page-specific changes to the default properties of certain controls. You need to apply the General theme to all pages, and you must ensure that the page-specific customizations are preserved.
What should you do?
A. Add the following configuration to the web.config file.Set the following page directive on pages that have customizations.You are implementing an ASP. NET MVC 2 Web application.
You add a controller named CompanyController.
You need to modify the application to handle the URL path /company/info.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Add the following method to the CompanyController class.Function Info () As ActionResultReturn View ()End FunctionYou are implementing an ASP.NET page in an e-commerce application. Code in a btnAddToCart_Click event handler adds a product to the shopping cart. The page should check the status of the shopping cart and always show a cart icon when one or more items are in the shopping cart. The page should hide the icon when the shopping cart has no items. You need to add an event handler to implement this requirement.
Which event handler should you add?
A. btnAddToCart_ClickYou are implementing an ASP.NET Web site that uses a custom server control named Task. Task is defined as shown in the following list.
稢lass name: Task種amespace: DevControls稟ssembly: TestServerControl.dll
稡ase class: System.Web.UI.WebControls.WebControl
You copy TestServerControl.dll to the Web sites Bin folder.
You need to allow the Task control to be declaratively used on site pages that do not contain an explicit @ Register directive.
Which configuration should you add to the web.config file?
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.
....
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.)
A. ....You create a Web page that has an ASP.NET menu. You need to ensure that the menu items are populated from an array of strings in your code-behind file. What should you do?
A. Write a JavaScript function that uses document.write to write out an asp:MenuItem for each string array element.You are adding new capabilities to an ASP.NET Web site. The site currently connects to a Microsoft SQL database by using the.... of the CONTOSO\AppIdentity account, which has been granted access to only objects within the database.
The application requires the following implementation.

Database objects that support ASP.NET roles must be added to the existing database.

The CONTOSO\AppIdentity user must be granted only the minimum privileges that are required to support all features of ASP.NET.......
You need to add the ASP.NET roles support. Which two actions should you perform?
A. Use the aspnet_regsql tool.Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-515 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.