70-515 training materials(46 to 60) for IT learners: Apr 2016 Edition

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 70-515 Exam Dumps (PDF & VCE):
Available on: https://www.certleader.com/70-515-dumps.html


Breathing of 70-515 exam question materials and study guides for Microsoft certification for consumer, Real Success Guaranteed with Updated 70-515 pdf dumps vce Materials. 100% PASS TS: Web Applications Development with Microsoft .NET Framework 4 exam Today!

2016 Apr 70-515 Study Guide Questions:

Q46. You use the following declaration to add a Web user control named TestUserControl.ascx to an ASP.NET page named TestPage.aspx. 

<uc:TestUserControl ID="testControl" runat="server"/> 

You add the following code to the code-behind file of TestPage.aspx. 

private void TestMethod() 

… 

You define the following delegate. 

public delegate void MyEventHandler(); 

You need to add an event of type MyEventHandler named MyEvent to TestUserControl.ascx and attach the page's TestMethod method to the event. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Add the following line of code to TestUserControl.ascx.cs. public event MyEventHandler MyEvent; 

B. Add the following line of code to TestUserControl.ascx.cs. public MyEventHandler MyEvent; 

C. Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. 

<uc:TestUserControl ID="testControl" runat="server" OnMyEvent="TestMethod"/> 

D. Replace the TestUserControl.ascx reference in TestPage.aspx with the following 

declaration. 

<uc:TestUserControl ID="testControl" runat="server" 

MyEvent="TestMethod"/> 

Answer: AC 


Q47. You are developinASP.NETg an Dynamic Data Web application. The application uses entities from a global library named Entities. The Application_Start event contains the following code segment. 

DefaultModel.RegisterContect(typeof)(Entities.MyDBDataContext), new ContextConfiguration() { ScaffoldAllTables = false }); 

You need to ensure that the application shows the Order and Customer entities and hides all other entities. 

What should you do? 

A. Set the ScaffoldAMTables property of the ContextConfiguration to true. 

B. Create a partial class for each entity except Order and Customer within the Entities library and apply the attribute. 

C. Create a partial class for the Order and Customer entities within the Web application and apply the[ScaffoldAMTables ] 

D. Create a partial class for the Order and Customer entities within the Entities library and apply the [ScaffoldAMTables ] 

Answer: D 


Q48. You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. Which interface should you add the extension method to? 

A. IComparer<T> 

B. IEnumerable<T> 

C. IEnumerator<T> 

D. IEqualityComparer<T> 

Answer: B 


Q49. You are developing an ASP.NET MVC 2 application. 

You create a view that will be returned by action methods in multiple controllers. 

You need to place the view in the appropriate folder. 

To which subfolder within the Views folder should you add the view? 

A. Master 

B. Default 

C. Shared 

D. Common 

Answer: C 


Q50. jQuery CheckBoxes 

In a web page with chechboxes you need to write e jquery that retruns the number checked checkboxes 

A. $(“input:checked”).length; 

B. $(“input”, selected).length; 

C. $(“input:selected”).length; 

Answer: A 


70-515 vce

Update 70-515 practice:

Q51. You are developing an ASP.NET AJAX extender control. The extender includes the following segment. 

public class DisabledButtonExtender : ExtenderControlBase { 

[ExtenderControlProperty] 

public string TargetID 

get{...} 

set{...} 

You need to ensure that the extender can be user to extend only text boxes and that the targetID property can reference only buttons. 

What should you do? 

A. Apply the following attribute to the class. 

[ValidationProperty("TextBox")] 

Apply the fallowing attribute to TargetID 

[Filterable(true)] 


B. Apply the following attribute to the class. 

[TargetControlType(typeof(TextBox))] 

Apply the following attribute to TargetID 

[Filterable(true)] 


C. Apply the following attribute to the class. 

[ValidationProperty("TextBox")] 

Apply the following attribute to TargetID 

[IDReferenceProperty(typeof(Button))] 


D. Apply the following attribute to the class. 

[TargetControlType(typeof(TextBox))] 

Apply the following attribute to TargetID 

[IDReferenceProperty(typeof(Button))] 


Answer: D 


Q52. You have a master page custom.master ... u create a nested.master page using it ... 

and then u have content page that uses the nested.master as its master page ... to get a string prop from custom.master into a label in content page the code u wud use... 

A. master.master 

B. parent.master 

C. this.master 

D. unknown 

Answer: B 


Q53. You are developing an ASP.NET Web page named WebPage.aspx. 

The page includes a user control named UserlnfoControl.ascx 

You need to expose a control property named FirstName and read its value from the page. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 


A. Add the following code segment to UserInfoControl.ascx.cs: 

protected string FirstName { get; set; } 

B. Add the following code segment to UserInfoControl.ascx.cs: public string FirstName { get; set; } 

C. Add the following code segment to WebPage.aspx.cs: var firstName = UserInfoControl1.Attributes["FirstName"]; 

D. Add the following code segment to WebPage.aspx.cs: var firstName = UserInfoControl1.FirstName; 

Answer: BD 


Q54. You are developing an ASP.NET MVC 2 Web Application. 

You need to implement an asynchronous controller named AccountingController, and you must ensure that the export action required proper authorization. 

Which code segment should you use? 

A. 

public class AccountingController : Controller 

public void ExportAsync() {...} 

[Authorise] 

public void ExportCompleted() {...} 


B. 

public class AccountingController : AsyncController 

[Authorise] 

public void ExportAsync() {...} 

public void ExportCompleted() {...} 


C. 

public class AccountingController : AsyncController { [Authorise] public void Export() {...} } 

D. 

public class AccountingController : Controller 

[Authorise] 

public void ExportAsync() {...} 

[Authorise] 

public void ExportCompleted() {...} 


Answer: B 


Q55. You are implementing an ASP.NET page that includes a text box. 

You need to validate values that are typed by users to ensure that only numeric values are submitted. 

Which control markup should you use? 

A. <asp:TextBox ID="txt1" runat="server" 

CausesValidation="true" 

ValidationGroup="Numeric" /> 


B. <asp:TextBox ID="txt1" runat="server" 

EnableClientScript="true" 

ValidationGroup="Numeric" /> 


C. <asp:TextBox ID="txt1" runat="server" /> 

<asp:RegularExpressionValidator ID="val1" 

runat="server" 

ControlToValidate="txt1" 

ValidationExpression="[0-9]*" 

ErrorMessage="Invalid input value" /> 


D. <asp:TextBox ID="txt1" runat="server" /> 

<asp:RegularExpressionValidator ID="val1" 

EnableClientScript="true" ControlToValidate="txt1" 

ValidationExpression="[0-9]*" 

ErrorMessage="Invalid input value" /> 


Answer: C 


70-515 exam fees

Top Quality 70-515 book:

Q56. You are implementing an ASP.NET application that uses data-bound GridView controls in multiple pages. You add JavaScript code to periodically update specific types of data items in these GridView controls. You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridView controls, without needing to be changed if the controls are moved from one page to another. What should you do? 

A. Replace the GridView control with a ListView control. 

B. Set the ClientIDMode attribute to Predictable in the web.config file. 

C. Set the ClientIDRowSuffix attribute of each unique GridView control to a different value. 

D. Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control. 

Answer: C 


Q57. You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView. Which code segment should you use? 

A. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataMember = "OrderDetailsTable"; 

dtlView.DataBind(); 


B. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataSourceID = "OrderDetailsTable"; 

dtlView.DataBind(); 


C. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataKeyNames = new string [] { "OrderDetailsTable"}; 

dtlView.DataBind(); 


D. DataSet dataSet = GetCustomerOrderDataSet(); 

dtlView.DataSource = new DataTable("dataSet", "OrderDetailsTable"); dtlView.DataBind(); 


Answer: A 


Q58. You create a new ASP.NET MVC 2 Web application. The following default routes are created in the Global.asax.cs file. (Line numbers are included for reference only.) 

01 public static void RegisterRoutes(RouteCollection routes) 

02 { 

03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 


05 routes.MapRoute( 

"Default", 

"{controller}/{action}/{id}", 

new { controller = "Home", action = "Index", id = "" } 

); 


06 } 

You implement a controller named HomeController that includes methods with the following signatures. 

public ActionResult Index() 

public ActionResult Details ( int id ) 

public ActionResult DetailsByUsername(string username) 

You need to add a route to meet the following requirements. 

.

 The details for a user must be displayed when a user name is entered as the path by invoking the DetailsByUsername action. 


.

 User names can contain alphanumeric characters and underscores, and can be between 3 and 20 characters long. 


What should you do? 

A. Replace line 05 with the following code segment. 

routes.MapRoute("Default", "{controller}/{action}/{id}", new {controller = 

"Home", action = "DetailsByUsername", id = ""}); 


B. Replace line 05 with the following code segment. 

routes.MapRoute("Default", "{controller}/{action}/{username}", new {controller = 

"Home", action = "DetailsByUsername", username = ""}, new {username = @"\w 

{3,20}"}); 


C. At line 04, add the following code segment. 

routes.MapRoute("Details by Username", "{username}", new {controller = "Home", 

action = "DetailsByUsername"}, new {username = @"\w{3,20}"}); 


D. At line 04, add the following code segment. 

routes.MapRoute("Details by Username", "{id}", new {controller = "Home", action 

= "DetailsByUsername"}, new {id = @"\w{3,20}"}); 


Answer: C 


Q59. You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. 

Which interface should you add the extension method to? 

A. IComparer(Of T) 

B. IEnumerable(Of T) 

C. IEnumerator(Of T) 

D. IEqualityComparer(Of T) 

Answer: B 


Q60. You create a new ASP.NET MVC 2 Web application. The following default routes are created in the Global.asax.cs file. (Line numbers are included for reference only.) 

01 public static void RegisterRoutes(RouteCollection routes) 

02 { 

03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 


05 routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); 

06 } 

You implement a controller named HomeController that includes methods with the following signatures. 

public ActionResult About() 

public ActionResult Index() 

public ActionResult Details(int id) 

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.cs file, add the following line of code. routes.MapRoute("Default4Empty", "/", new {controller = "Home", action = "About"}); 

B. At line 04 in the Global.asax.cs file, add the following line of code. routes.MapRoute("Default", "", new {controller = "Home", action = "About"}); 

C. Replace line 05 in the Global.asax.cs file with the following line of code. routes.MapRoute("Default4Empty", "{controller}/{action}/{id}", new {controller = "Home", action = "About", id = ""}); 

D. Replace line 05 in the Global.asax.cs file with the following line of code. routes.MapRoute("Default", "{controller}/{action}", new {controller = "Home", action = "About"}); 

Answer: C