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 11:

    You create a Web page that contains the following div.

    You have a JavaScript array named imageurls that contains a list of image URLs. You need to write a JavaScript function that will insert images from the URLs into target.

    Which code segment should you use?

    A. $(imageurls).each(function(i,url){$("", url).append("#target");});
    B. $(imageurls).each(function(i,url){$("#target") += $("").attr("src", url);});
    C. $.each(imageurls, function(i,url){$("").attr("src", url).appendTo("#target");});
    D. $.each(imageurls, function(i,url){$("#target").append("").src = url;});

  • Question 12:

    You create a Web page that contains the following image element.

    You need to write a JavaScript function that will dynamically change which image is displayed. The function must be compatible across different browsers. Which code segment should you use?

    A. function changeImage() {myImage.src = "image2.png"; }
    B. function changeImage() {document.getElementById("myImage").src ="image2.png"; }
    C. function changeImage() {getElementById("myImage").src ="image2.png"; }
    D. function changeImage() {window.getElementById("myImage").src ="image2.png"; }

  • Question 13:

    You create an ASP.NET page that contains the following tag.

    Page Name

    You need to write code that will change the contents of the tag dynamically when the page is loaded. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution.

    Choose two.)

    A. this.hdr1.InnerHtml = "Text";
    B. (hdr1.Parent as HtmlGenericControl).InnerText = "Text";
    C. HtmlGenericControl h1 =this.FindControl("hdr1") as HtmlGenericControl;h1.InnerText = "Text";
    D. HtmlGenericControl h1 =Parent.FindControl("hdr1") as HtmlGenericControl;h1.InnerText = "Text";

  • Question 14:

    You are implementing an ASP.NET application that makes extensive use of JavaScript libraries. Not all pages use all scripts, and some scripts depend on other scripts. When these libraries load sequentially, some of your pages load too slowly. You need to use the ASP.NET Ajax Library Script Loader to load these scripts in parallel.

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

    A. In your site's master page, add a call to Sys.loader.defineScripts to define each of the scripts that are used in the site.
    B. In your site's master page, add a call to Sys.loader.registerScript to define each of the scripts that are used in the site.
    C. In each page that users scripts, add a call to Sys.get for each script that is needed in that page.
    D. In each page that users scripts, add a call to Sys.require for each script that is needed in that page.

  • Question 15:

    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() {...}}

  • Question 16:

    You create a Web page that contains the span shown in the following line of code.

    Text

    You need replace the contents of the span with HTML that you download from a URL specified by a global variable named localURL.

    Which code segment should you use?

    A. $.ajax({type: "GET",url: localURL,dataType: "jsonp",success: function(htmlText) {$ ("#span1").text (htmlText);}});
    B. $.ajax(localURL, {},function(htmlText) {$("#span1").html(htmlText);},"html");
    C. $.ajax({type: "GET",url: localURL,dataType: "html",success: function(htmlText) {$ ("#span1").innerHTML = htmlText;}});
    D. $.ajax({type: "GET",url: localURL,success: function(htmlText) {$("#span1").html(htmlText);}});

  • Question 17:

    You are developing a Asp.net MVC 2 application

    The following Customer class is rendered by the Html.DisplayForModel helper method.

    public class Customer

    {

    public string FirstName { get; set;}

    public string LastName { get; set;}

    public string EmailAddress { get; set;}

    }

    You create a partial view named Email.ascx in the Views/Shared/DisplayTemplates folder. Email.ascx performs custom formatting of e-mail addresses.

    You need to ensure that the custom formatting is applied to only the EmailAddress property.

    What should you do?

    A. Rename Email.ascx to String.ascx.
    B. Add the following attribute to the EmailAddress property.[DataType(DataType.EmailAddress)]
    C. Add the following attribute tot the EmailAddress property[UIHint("Email")]
    D. Rename Email.ascx to EmailAddress.ascx

  • Question 18:

    You are creating an ASP.NET Web site. You create a HTTP module named CustomModule, and you register the module in the web.config file. The CustomModule class contains the following code.

    public class CustomModule : IHttpModule

    {

    string footerContent = "

    Footer Content
    ";

    public void Dispose( ) {}

    }

    You need to add code to CustomModule to append the footer content to each processed ASP.NET page.

    Which code segment should you use?

    A. public CustomModule(HttpApplication app){app.EndRequest += new EventHandler(app_EndRequest);} void app_EndRequest(object sender, EventArgs e){HttpApplication app = sender as HttpApplication;app.Response.Write (footerContent);}
    B. public void Init(HttpApplication app) {app.EndRequest += new EventHandler(app_EndRequest);}void app_EndRequest(object sender, EventArgs e){HttpApplication app = new HttpApplication ();app.Response.Write(footerContent); }
    C. public CustomModule(){HttpApplication app = new HttpApplication();app.EndRequest += new EventHandler(app_EndRequest); }void app_EndRequest(object sender, EventArgs e){HttpApplication app = sender as HttpApplication;app.Response.Write(footerContent); }
    D. public void Init(HttpApplication app){app.EndRequest += new EventHandler(app_EndRequest); } void app_EndRequest(object sender, EventArgs e){HttpApplication app = sender as HttpApplication;app.Response.Write(footerContent); }

  • Question 19:

    You are deloping an ASP.NET 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 ScaffoldAllTables 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 [ScaffoldTable(false)] attribute.
    C. Create a partial class for the Order and Customer entities within the web application and apply the [ScaffoldTable(true)] attribute.
    D. Create a partial class for the Order and Customer entities within the Entities library and apply the [ScaffoldTable(true)] attribute.

  • Question 20:

    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?

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.