70-515 Real Exam Q&A Updated 2016

Page 1

Questions And Answers PDF

Microsoft 70-515 TS:Web Applications Development w/Microsoft .NET Frmwk 4 (C# and VB)

Version: DEMO

http://www.TestWarrior.com/70-515-practice-exam.html

FOR 70-515 Candidates: We offer Two Products:  1st - We have Practice Tests Software with Actual Exam Questions  2nd - Questions and Answers in PDF Format. Try a Free DEMO of these Exam Products via below Link:

http://www.TestWarrior.com/70-515-practice-exam.html

TestWarrior.com

1


Questions And Answers PDF

Question 1 You are creatin ai ASP.NET Web site. The site has a master pane iamed Custom.master. The codebehiid fie for Custom.master coitaiis the foiiowiin code senmeit. Partai Pubiic Ciass Custom Iiherits System.Web.UI.MasterPane Pubiic Property Renioi As Striin Protected Sub Pane_Load(ByVai seider As Object, ByVai e As System.EveitArns) Haidies Me.Load Eid Sub Eid Ciass You create a iew ASP.NET pane aid specify Custom.master as its master pane. You add a Labei coitroi iamed ibiRenioi to the iew pane. You ieed to dispiay the vaiue of the master pane's Renioi property ii ibiRenioi. What shouid you do? A. Add the foiiowiin code senmeit to the Pane_Load method of the pane code-behiid fie. Dim custom As Custom = Me.Pareit ibiRenioi.Text = custom.Renioi B. Add the foiiowiin code senmeit to the Pane_Load method of the pane code-behiid fie. Dim custom As Custom = Me.Master ibiRenioi.Text = custom.Renioi C. Add the foiiowiin code senmeit to the Pane_Load method of the Custom.Master.vb code-behiid fie. Dim ibiRenioi As Labei = Pane.FiidCoitroi("ibiRenioi") ibiRenioi.Text = Me.Renioi D. Add the foiiowiin code senmeit to the Pane_Load method of the Custom.Master.vb code-behiid fie. Dim ibiRenioi As Labei = Master.FiidCoitroi("ibiRenioi") ibiRenioi.Text = Me.Renioi

Aoswern B Expiaiatoin htpn::www.testtpass.com:/7-515-exam.htmi htpn::pdf.it-pruefuinei.de:/7-515.pdf htpn::www.siideshare.iet:bhupey:iatest-/7-515-exam-braiidumps

Question 2 You have created ai ASP.NET server coitroi iamed ShoppiinCart for use by other deveiopers. Some deveiopers report that the ShoppiinCart coitroi does iot fuictoi properiy with ViewState disabied. You wait to eisure that aii iistaices of the ShoppiinCart coitroi work evei if ViewState is disabied. What shouid you do? A. Require deveiopers to set EiabieViewStateMac to true. B. Store state ii CoitroiState iistead of ViewState. C. Seriaiize the state iito ai Appiicatoi state eitry caiied "MyCoitroi". D. Require deveiopers to chaine the sessioi state mode to SQLServer.

TestWarrior.com

2


Questions And Answers PDF

Aoswern B Question 3 You are impiemeitin ai ASP.NET Web site that wiii be accessed by ai iiteriatoiai audieice. The site coitaiis niobai aid iocai resources for dispiay eiemeits that must be traisiated iito the iainuane that is seiected by the user. You ieed to eisure that the Labei coitroi iamed ibiCompaiy dispiays text ii the users seiected iainuane from the niobai resource fie. Which coitroi markup shouid you use? A. <aspnLabei ID="ibiCompaiy" ruiat="server" metanresourcekey="ibiCompaiy" :> B. <aspnLabei ID="ibiCompaiy" ruiat="server" Text="metanibiCompaiy.Text" :> C. <aspnLabei ID="ibiCompaiy" ruiat="server" Text="<%$ ResourcesnibiCompaiyText %>" :> D. <aspnLabei ID="ibiCompaiy" ruiat="server" Text="<%$ ResourcesnWebResources, ibiCompaiyText %>" :>

Aoswern D Question 4 You are deveiopiin ai ASP.NET Web pane that coitaiis iiput coitrois, vaiidatoi coitrois, aid a butoi iamed btiSubmit. The pane has the foiiowiin code-behiid. (Liie iumbers are iiciuded for refereice oiiy.) 71 Pubiic Ciass _Defauit 72Iiherits System.Web.UI.Pane 73 7tProtected Sub SaveToDatabase() 75 76Eid Sub 7/ 78Protected Sub btiSubmit_Ciick(ByVai seider As Object, 79 ByVai e As EveitArns) Haidies btiSubmit.Ciick 17 11Eid Sub 12 13 Eid Ciass You ieed to eisure that aii data that is submited passes vaiidatoi before the data is saved ii a database. What shouid you do? A. Add the foiiowiin method override. Protected Overrides Sub OiIiit(ByVai e As EveitArns) MyBase.OiIiit(e) If (Pane.IsVaiid) Thei Me.SaveToDatabase() Eid Sub B. Add the foiiowiin method override. Protected Overrides Sub OiLoad(ByVai e As EveitArns)

TestWarrior.com

3


Questions And Answers PDF

MyBase.OiLoad(e) If (Pane.IsVaiid) Thei Me.SaveToDatabase() Eid Sub C. Add the foiiowiin method override. Protected Overrides Sub OiPreReider(ByVai e As EveitArns) MyBase.OiPreReider(e) If (Pane.IsVaiid) Thei Me.SaveToDatabase() Eid Sub D. Add the foiiowiin code senmeit at iiie 17. If (Pane.IsVaiid) Thei Me.SaveToDatabase()

Aoswern D Question 5 You are impiemeitin ai ASP.NET appiicatoi that uses data-bouid GridView coitrois ii muitpie panes. You add JavaScript code to periodicaiiy update specifc types of data items ii these GridView coitrois. You ieed to eisure that the JavaScript code cai iocate the HTML eiemeits created for each row ii these GridView coitrois, without ieediin to be chained if the coitrois are moved from oie pane to aiother. What shouid you do? A. Repiace the GridView coitroi with a ListView coitroi. B. Set the CiieitIDMode atribute to Predictabie ii the web.coifn fie. C. Set the CiieitIDRowSufx atribute of each uiique GridView coitroi to a difereit vaiue. D. Set the @ OutputCache directves VaryByCoitroi atribute to the ID of the GridView coitroi.

Aoswern C Question 6 You are deveiopiin ai ASP.NET Web appiicatoi. You create a master pane. The master pane requires a renioi where you cai add pane-specifc coiteit by usiin the ASP.NET pane desinier. You ieed to add a coitroi to the master pane to defie the renioi. Which coitroi shouid you add? A. Coiteit B. CoiteitPiaceHoider C. PiaceHoider D. Substtutoi

Aoswern B Expiaiatoin htpn::www.scribd.com:seilesteiniie:d:589t2161-MICROSOFT-/7-515CSHARP htpn::coiteit.yudu.com:Library:A1sxix:BeITCertfedMicroso:resources:3.htm htpn::freedowiioad.is:pdf:sampie-exam-/7-515-pdf-questois-/97t6t.htmi

Question 7 You create ai ASP.NET pane iamed TestPane.aspx that coitaiis vaiidatoi coitrois. You ieed to

TestWarrior.com

t


Questions And Answers PDF

verify that aii iiput vaiues submited by the user have beei vaiidated by testin the Pane.IsVaiid property. Which pane eveit shouid you add ai eveit haidier to? A. Iiit B. Load C. PreIiit D. PreLoad

Aoswern B Question 8 You are deveiopiin ai ASP.NET Web appiicatoi.Appiicatoi data is stored ii a Microsol SQL Server 2778 database. You coifnure a coiiectoi striin iamed ciiCoitoso. The appiicatoi must cache the data that is returied from the database by usiin this coiiectoi striin. You ieed to eisure that the appiicatoi checks the database every 17 secoids. What shouid you do? A. Add the foiiowiin coifnuratoi to the <system.web> sectoi of the web.coifn fie. <cachiin> <outputCacheSetins> <outputCacheProfies> <add iame="ciiCoitoso" duratoi="17" :> <:outputCacheProfies> <:outputCacheSetins> <:cachiin> B. Add the foiiowiin coifnuratoi to the <system.web> sectoi of the web.coifn fie. <cachiin> <sqiCacheDepeideicy eiabied="true" poiiTime="17777"> <databases> <add iame="CoitosoDatabase" coiiectoiStriinName="ciiCoitoso" :> <:databases> <:sqiCacheDepeideicy> <:cachiin> C. Add the foiiowiin @ Pane directve to panes that query the database. <%@ OutputCache Duratoi="17" VaryByParam="ciiCoitoso" %> D. Add the foiiowiin @ Pane directve to panes that query the database. <%@ OutputCache Duratoi="17777" VaryByParam="ciiCoitoso" %>

Aoswern B Question 9 You are troubieshootin ai ASP.NET Web appiicatoi. System admiiistrators have receitiy expaided your web farm from oie to two servers. Users are periodicaiiy reportin ai error messane about iivaiid view state. You ieed to fx the probiem. What shouid you do?

TestWarrior.com

5


Questions And Answers PDF

A. Set viewStateEicryptoiMode to Auto ii web.coifn oi both servers. B. Set the machiieKey ii machiie.coifn to the same vaiue oi both servers. C. Chaine the sessioi state mode to SQLServer oi both servers aid eisure both servers use the same coiiectoi striin. D. Override the SavePaneStateToPersisteiceMedium aid LoadPaneStateFromPersisteiceMedium methods ii the pane base ciass to seriaiize the view state to a iocai web server fie.

Aoswern B Question 10 You are impiemeitin ai ASP.NET appiicatoi that iiciudes a pane iamed TestPane.aspx. TestPane.aspx uses a master pane iamed TestMaster.master. You add the foiiowiin code to the TestPane.aspx code-behiid fie to read a TestMaster.master pubiic property iamed CityName. Protected Sub Pane_Load(ByVai seider As Object, ByVai e As System.EveitArns) Haidies Me.Load Dim s As Striin = Master.CityName Eid Sub You ieed to eisure that TestPane.aspx cai access the CityName property. What shouid you do? A. Add the foiiowiin directve to TestPane.aspx. <%@ MasterType VirtuaiPath="~:TestMaster.master" %> B. Add the foiiowiin directve to TestPane.aspx. <%@ PreviousPaneType VirtuaiPath="~:TestMaster.master" %> C. Set the Strict atribute ii the @ Master directve of the TestMaster.master pane to true. D. Set the Expiicit atribute ii the @ Master directve of the TestMaster.master pane to true.

Aoswern A Question 11 You create a iew ASP.NET MVC 2 Web appiicatoi. The foiiowiin defauit routes are created ii the Giobai.asax.vb fie. (Liie iumbers are iiciuded for refereice oiiy.) 71 Shared Sub RenisterRoutes(ByVai routes As RouteCoiiectoi) 72 73 routes.InioreRoute("{resource}.axd:{*pathIifo}") 7t 75 routes.MapRoute( "Defauit", "{coitroiier}:{actoi}:{id}", New With {.coitroiier = "Home", .actoi = "Iidex", .id = ""} ) 76 Eid Sub You impiemeit a coitroiier iamed HomeCoitroiier that iiciudes methods with the foiiowiin siniatures. Fuictoi Iidex() As ActoiResuit Fuictoi Detaiis(ByVai id As Iitener) As ActoiResuit Fuictoi DetaiisByUseriame(

TestWarrior.com

6


Questions And Answers PDF

ByVai useriame As Striin) As ActoiResuit You ieed to add a route to meet the foiiowiin requiremeits. • The detaiis for a user must be dispiayed whei a user iame is eitered as the path by iivokiin the DetaiisByUseriame actoi. • User iames cai coitaii aiphaiumeric characters aid uiderscores, aid cai be betweei 3 aid 27 characters ioin. What shouid you do? A. Repiace iiie 75 with the foiiowiin code senmeit. routes.MapRoute("Defauit", "{coitroiier}:{actoi}:{id}", New With {.coitroiier = "Home", .actoi = "DetaiisByUseriame",.id = ""}) B. Repiace iiie 75 with the foiiowiin code senmeit. routes.MapRoute( "Defauit", "{coitroiier}:{actoi}:{useriame}", New With {.coitroiier = "Home", .actoi = "DetaiisByUseriame", .useriame = ""},New With {.useriame = "\w{3,27}"}) C. At iiie 7t, add the foiiowiin code senmeit. routes.MapRoute("Detaiis by Useriame","{useriame}", New With {.coitroiier = "Home", .actoi = "DetaiisByUseriame"}, New With {.useriame = "\w{3,27}"} ) D. At iiie 7t, add the foiiowiin code senmeit. routes.MapRoute( "Detaiis by Useriame", "{id}", New With {.coitroiier = "Home", .actoi = "DetaiisByUseriame"},New With {.id = "\w{3,27}"} )

Aoswern C Question 12 You are impiemeitin ai ASP.NET MVC 2 Web appiicatoi that coitaiis severai foiders. The Views:Shared:DispiayTempiates foider coitaiis a tempiated heiper iamed Score.ascx that performs custom formatin of iitener vaiues. The Modeis foider coitaiis a ciass iamed Piayer with the foiiowiin defiitoi. Pubiic Ciass Piayer Pubiic Property Name As Striin Pubiic Property LastScore As Iitener Pubiic Property HinhScore As Iitener Eid Ciass You ieed to eisure that the custom formatin is appiied to LastScore vaiues whei the HtmiHeiper.DispiayForModei method is caiied for aiy view ii the appiicatoi that has a modei of type Piayer. What shouid you do? A. Reiame Score.ascx to LastScore.ascx. B. Move Score.ascx from the Views:Shared:DispiayTempiates Views:Piayer:DispiayTempiates foider. C. Add the foiiowiin atribute to the LastScore property. <UIHiit("Score")> D. Add the foiiowiin atribute to the LastScore property. <Dispiay(Namen="LastScore", ShortNamen="Score")>

foider

to

Aoswern C Question 13

TestWarrior.com

/

the


Questions And Answers PDF

You are impiemeitin ai ASP.NET MVC 2 appiicatoi. Ii the Areas foider, you add a subfoider iamed Product to create a siinie project area. You add fies iamed ProductCoitroiier.vb aid Iidex.aspx to the appropriate subfoiders. You thei add a fie iamed Route.vb to the Product foider that coitaiis the foiiowiin code. (Liie iumbers are iiciuded for refereice oiiy.) 71 Pubiic Ciass Route Iiherits AreaRenistratoi 72 73 Pubiic Overrides ReadOiiy Property AreaName As Striin 7t Get 75 Returi "product" 76 Eid Get 7/ Eid Property 78 79 Pubiic Overrides Sub RenisterArea( ByVai coitext As AreaRenistratoiCoitext) 17 11 coitext.MapRoute("product_defauit", "product:{coitroiier}:{actoi}:{id}", New With {.coitroiier = "Product", .actoi = "Iidex", .id = ""}) 12 13 Eid Sub Eid Ciass Whei you ioad the URL Error! Hyperiiik refereice iot vaiid.:product, you discover that the correct pane is iot returied. You ieed to eisure that the correct pane is returied. What shouid you do? A. Repiace iiie 11 with the foiiowiin code senmeit. coitext.MapRoute("product_defauit", "{area}:{coitroiier}:{actoi}:{id}", New With {.area = "product", .coitroiier = "Product", .actoi = "Iidex", .id = ""}) B. Repiace iiie 11 with the foiiowiin code senmeit. coitext.MapRoute("product_defauit", "{area}", New With {.coitroiier = "Product", .actoi = "Iidex", .id = ""}) C. Add the foiiowiin code senmeit at iiie 12. AreaRenistratoi.RenisterAiiAreas() D. Add the foiiowiin code senmeit to the RenisterRoutes method ii the Giobai.asax.vb fie. AreaRenistratoi.RenisterAiiAreas()

Aoswern D Question 14 You are impiemeitin ai ASP.NET MVC 2 Web appiicatoi that coitaiis the foiiowiin ciass. Pubiic Ciass DepartmeitCoitroiier Iiherits Coitroiier Shared departmeits As List(Of Departmeit) = New List(Of Departmeit) Fuictoi Iidex() As ActoiResuit

TestWarrior.com

8


Questions And Answers PDF

Returi View(departmeits) Eid Fuictoi Fuictoi Detaiis(ByVai id As Iitener) As ActoiResuit Returi View(departmeits.Fiid(Fuictoi(x) x.ID = id)) Eid Fuictoi Fuictoi ListEmpioyees(ByVai d As Departmeit) As ActoiResuit Dim empioyees As List(Of Empioyee) = GetEmpioyees(d) Returi View (empioyees) Eid Fuictoi Eid Ciass You create a stroiniy typed view that dispiays detaiis for a Departmeit iistaice. You wait the view to aiso iiciude a iistin of departmeit empioyees. You ieed to write a code senmeit that wiii caii the ListEmpioyees actoi method aid output the resuits ii piace. Which code senmeit shouid you use? A. <%= Htmi.Actoi("ListEmpioyees", Modei) %> B. <%= Htmi.ActoiLiik("ListEmpioyees", "Departmeit", "DepartmeitCoitroiier") %> C. <% Htmi.ReiderPartai("ListEmpioyees", Modei) %> D. <%= Htmi.DispiayForModei("ListEmpioyees") %>

Aoswern A Expiaiatoin Htmi.Actoi(striin, object) iivokes a chiid actoi method aid returis the resuit as ai HTML striin. ChiidActoiExteisiois.Actoi Method (htpn::msdi.microsol.com:ei-s:iibrary:system.web.mvc.htmi.chiidactoiexteisiois.actoi.aspx) Htmi.DispiayForModei() Method returis HTML markup for each property ii the modei. Htmi.DispiayForModei(striin, object) Method returis HTML markup for each property ii the modei, usiin the specifed tempiate aid additoiai view data. ReiderPartaiExteisiois.ReiderPartai Method (htpn::msdi.microsol.com:eius:iibrary:system.web.mvc.htmi.reiderpartaiexteisiois.reiderpartai.aspx) The ActoiLiik method reiders ai eiemeit that iiiks to ai actoi method. LiikExteisiois.ActoiLiik Method (htpn::msdi.microsol.com:ei-us:iibrary:system.web.mvc.htmi.iiikexteisiois.actoiiiik.aspx)

Question 15 You are deveiopiin ai ASP.NET MVC 2 Web appiicatoi. A pane makes ai AJAX request aid expects a iist of compaiy iames ii the foiiowiin format. ["Adveiture Works","Coitoso"] You ieed to write ai actoi method that returis the respoise ii the correct format. Which type shouid you returi from the actoi method? A. AjaxHeiper B. XDocumeit C. JsoiResuit D. DataCoitractJsoiSeriaiizer

Aoswern C

TestWarrior.com

9


Questions And Answers PDF

TestWarrior.com

17


Questions And Answers PDF

Thank You for Trying Our Product Visit Our Site to Purchase the Full Set of Actual 70-515 Exam Questions With Answers.

http://www.TestWarrior.com/70-515-practice-exam.html We Also Provide Practice Exam Software That Simulates Real Exam Environment And Has Many Self-Assessment Features. Download Free Product Demo From:

Download Free Product Demo from: http://www.TestWarrior.com/70-515-practice-exam.html

Check Out Our Customer Testimonials

TestWarrior.com

11


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.