70-515 Exam Details

  • Exam Code
    :70-515
  • Exam Name
    :TS: Web Applications Development with Microsoft .NET Framework 4
  • Certification
    :Microsoft Certifications
  • Vendor
    :Microsoft
  • Total Questions
    :285 Q&As
  • Last Updated
    :Jan 26, 2022

Microsoft 70-515 Online Questions & Answers

  • Question 101:

    You are implementing a WCF service library. You add a new code file that contains the following code segment.

    You build the service library and deploy its assembly to an IIS application. You need to ensure that the GetCurrentRate method can be called from JavaScript.

    What should you do?

    A. Add a file named Service.svc to the IIS application. Add the following code segment to the file. < %@ ServiceHost Service="ContosoWCF.IRateService"Factory="System.ServiceModel.Activation.WebScriptServiceHo stFactory" %>
    B. Add a file named Service.svc to the IIS application.Add the following code segment to the file.
    C. Apply the ScriptService attribute to the RateService class. Rebuild the WCF service library, and redeploy the assembly to the IIS application.
    D. Apply the WebGet attribute to the GetCurrentRate interface method. Rebuild the WCF service library, and redeploy the assembly to the IIS application.

  • Question 102:

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

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

    Private Sub TestMethod()

    End Sub

    You define the following delegate.

    Public Delegate Sub MyEventHandler()

    You need to add an event of type MyEventHandler named MyEvent to TestUserControl.ascx and attach the pages 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.vb.Public Event MyEvent As MyEventHandler
    B. Add the following line of code to TestUserControl.ascx.vb.Public MyEvent As MyEventHandler
    C. Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration.
    D. D. Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration.

  • Question 103:

    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 = ""} )

    06 End Sub

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

    Function Index() As ActionResult

    Function Details(ByVal id As Integer) As ActionResult

    Function DetailsByUsername(

    ByVal username As String) As ActionResult

    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 With {.controller = "Home", .action = "DetailsByUsername",.id = ""})
    B. Replace line 05 with the following code segment. routes.MapRoute( "Default", "{controller}/ {action}/ {username}", New With {.controller = "Home", .action = "DetailsByUsername", .username = ""},New With {.username = "\w{3,20}"})
    C. At line 04, add the following code segment.routes.MapRoute("Details by Username","{username}", New With {.controller = "Home", .action = "DetailsByUsername"}, New With {.username = "\w{3,20}"} )
    D. At line 04, add the following code segment.routes.MapRoute( "Details by Username", "{id}", New With {.controller = "Home", .action = "DetailsByUsername"},New With {.id = "\w{3,20}"} )

  • Question 104:

    You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform. You are creating an ASP.NET Web application using .NET Framework 4.0.

    The Web application comprises a class named Employee with properties named as First Name, Last Name, and Age.

    You add a Web page in which you get a list of Employee objects and display those objects in a GridView control.

    You are required to add code so that the GridView row is highlighted in red color if the age of the employee is less than 21 years.

    What will you do to accomplish this?

    A. Use the RowCommand event of the GridView control.
    B. Use the SelectedlndexChanged event of the GridView control.
    C. Use the RowDataBound event of the GridView control.
    D. Use the RowEditing event of the GridView control.
    E. Use the RowUpdated event of the GridView control.

  • Question 105:

    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}"});

  • Question 106:

    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?

    A. Use an HTML server-side include.
    B. Use the HTML.Display method
    C. Use the HTML.Partial method.
    D. Use the @Import directive

  • Question 107:

    Ajax extender

    [TargetControlType(typeof(TextBox))] public class DisabledButtonExtender : ExtenderControlBase {

    [ExtenderControlProperty]

    [DefaultValue("")]

    [IDReferenceProperty(typeof(Button))]

    Create an extender that extends a textbox and assigns to a button;

    Using wich combination?

    Correct Answer. [TargetControlType(typeof(TextBox))][IDReferenceProperty(typeof(Button))]

  • Question 108:

    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. Dim dataSet As DataSet = GetCustomerOrderDataSet() dtlView.DataSource = New DataTable ("dataSet", "OrderDetailsTable")dtlView.DataBind()

  • Question 109:

    You are developing an ASP.NET web page.

    The page includes the following EntityDataSource control:

    DefaultContainerName="AdventureWorksEntities" EnableFlattening="False" EntitySetName="Products" />

    The page must filter the data that is displayed in a grid based on a query string parameter named ProductPrefix.

    The grid must display products whose ProductName starts with the query string value. You need to ensure that the page generates the appropriate database query.

    What should you do?

    A. Add the following element to the EntityDataSource control:
    B. Add the following element to the EntityDataSource control:
    C. Add the following element to the EntityDataSource control:
    D. Add the following element to the EntityDataSource control:

  • Question 110:

    You are perfoming security testing on an existing asp.net web page. You notice that you are able to issue unauthorised postback requests to the page. You need to prevent unauthorised post back requests. which page directive you use?

Tips on How to Prepare for the Exams

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.