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

    Which method of the Page class searches the page naming container for a server control with a particular identifer?

    A. FindFieldTemplate
    B. FindControl
    C. FindDataSourceControl
    D. FindDataControl

  • Question 242:

    You are implementing an ASP.NET Web site. The site contains the following class.

    public class Address

    {

    public int AddressType;

    public string Line1;

    public string Line2;

    public string City;

    public string ZipPostalCode;

    }

    The Web site interacts with an external data service that requires Address instances to be given in the following XML format.

    250 Race Court

    Chicago

    60603

    You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML format requirements of the external data service.

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

    A. Add the following attribute to the AddressType field.[XmlAttribute]
    B. Add the following attribute to the Line2 field.[XmlElement(IsNullable=true)]
    C. Add the following attribute to the ZipPostalCode field.[XmlAttribute("ZipCode")]
    D. Add the following attribute to the ZipPostalCode field.[XmlElement("ZipCode")]

  • Question 243:

    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 uses scripts, add a call to Sys.get for each script that is needed in that page.
    D. In each page that uses scripts, add a call to Sys.require for each script that is needed in that page.

  • Question 244:

    You are developing an ASP.NET Web service. The following code segment implements the service.

    (Line numbers are included for reference only.)

    01 [WebServiceBinding(ConformsTo =

    WsiProfiles.BasicProfile1_1)]

    02 public class ProductService :

    System.Web.Services.WebService

    03 {

    04 [WebMethod]

    05 public Product GetProduct(string name)

    06 {

    08 }

    10 [WebMethod]

    11 public Product GetProduct(int id)

    12 {

    14 }

    15 }

    You need to ensure that both GetProduct methods can be called from a Web client.

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

    A. Remove line 01.
    B. Add the static modifier on lines 05 and 11.
    C. Add the following attribute before line 10. [SoapDocumentMethod(Action="GetProductById")]
    D. Modify the attribute on line 10 as follows. [WebMethod(MessageName="GetProductById")]

  • Question 245:

    You are developing an ASP.NET Web page.

    You add a data-bound GridView control. The GridView contains a TemplateField that includes a DropDownList. You set the GridViews ClientIDMode property to Static, and you set the ClientIDRowSuffix property to ProductID.

    You need to be able to reference individual DropDownList controls from client-side script by using the ProductID.

    What should you set the ClientIDMode property of the DropDownList to?

    A. AutoID
    B. Static
    C. Inherit
    D. Predictable

  • Question 246:

    You are implementing an ASP.NET application that uses LINQ to Entities to access and update the database.

    The application includes the following method to update a detached entity of type Person.

    private NorthwindContext _entities;

    public void UpdatePerson(Person personToEdit)

    {

    }

    You need to implement the UpdatePerson method to update the database row that corresponds to the personToEdit object.

    Which code segment should you use?

    A. _entities.People.Attach(personToEdit);_entities.ObjectStateManager.ChangeObjectState (personToEdit, EntityState.Modified);_entities.SaveChanges();
    B. _entities.ObjectStateManager.ChangeObjectState (personToEdit,EntityState.Added);_entities.SaveChan ges();
    C. _entities.People.ApplyCurrentValues(personToEdit);_entities.SaveChanges();
    D. _entities.People.Attach(new Person() { Id = personToEdit.Id }); _entities.ObjectStateManager.ChangeObjectState(personToEdit,EntityState.Modified);_entities.SaveC hanges();

  • Question 247:

    You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page will have text boxes that correspond to the columns in a database table. Each text box will be preceded by a label that displays the name of

    the corresponding column.

    You need to create the form so that when the user clicks the label, the corresponding text box is selected for input.

    What should you do?

    A. For each column, output the following HTML, where COL is replaced by the name of the column.COL
    B. For each column, output the following HTML, where COL is replaced by the name of the column.COL
    C. For each column, create an asp:Label control and a corresponding asp:TextBox that have the same ID.
    D. For each column, create an asp:Label control and set the AssociatedControlID to the ID of thecorresponding asp:Textbox control.

  • Question 248:

    You are developing a Web page. The user types a credit card number into an input control named cc and clicks a button named submit. The submit button sends the credit card number to the server. A JavaScript library includes a

    CheckCreditCard function that returns a value of true if the credit card appears to be valid, based on its checksum.

    You need to ensure that the form cannot be used to submit invalid credit card numbers to the server.

    What should you do?

    A. Configure the input control to run on the server. On the submit button, add a server-side OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid.
    B. On the input control, add an onChange handler that calls CheckCreditCard and cancels the form submission when the input is invalid.
    C. Configure the input control and the submit button to run on the server. Add a submit_OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid.
    D. On the form, add an onSubmit handler that calls CheckCreditCard and cancels the form submission if the input is invalid.

  • Question 249:

    You are implementing an ASP.NET application that uses LINQ to Entities to access and update the database. The application includes the following method to update a detached entity of type Person.

    private NorthwindContext _entities;

    public void UpdatePerson(Person personToEdit)

    {

    }

    You need to implement the UpdatePerson method to update the database row that corresponds to the personToEdit object.

    Which code segment should you use?

    A. _entities.People.Attach(personToEdit); _entities.ObjectStateManager.ChangeObjectState( personToEdit, EntityState.Modified); _entities.SaveChanges();
    B. _entities.ObjectStateManager.ChangeObjectState( personToEdit, EntityState.Added); _entities.SaveChanges();
    C. _entities.People.ApplyCurrentValues(personToEdit); _entities.SaveChanges(); _entities.People.Attach (new Person() { Id = personToEdit.Id });
    D. _entities.ObjectStateManager.ChangeObjectState( personToEdit, EntityState.Modified); _entities.SaveChanges();

  • Question 250:

    You are implementing an ASP.NET application that includes the following requirements. Retrieve the number of active bugs from the cache, if the number is present. If the number is not found in the cache, call a method named GetActiveBugs, and save the result under the ActiveBugs cache key. Ensure that cached data expires after 30 seconds. You need to add code to fulfill the requirements.

    Which code segment should you add?

    A. Dim numOfActiveBugs As Integer? = DirectCast(Cache("ActiveBugs"), Integer?) If Not numOfActiveBugs.HasValue Then Dim result As Int32 = GetActiveBugs() Cache.Insert("ActiveBugs", result, Nothing, DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration) numOfActiveBugs = result End If ActiveBugs = numOfActiveBugs.Value
    B. Dim numOfActiveBugs As Integer = CInt(Cache.Get("ActiveBugs")) If numOfActiveBugs 0 Then Dim result As Integer = GetActiveBugs() Cache.Insert("ActiveBugs", result, Nothing, DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration) numOfActiveBugs = result End If ActiveBugs = numOfActiveBugs
    C. Dim numOfActiveBugs As Integer = 0 If Cache("ActiveBugs") Is Nothing Then Dim result As Integer = GetActiveBugs() Cache.Add("ActiveBugs", result, Nothing, DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration, CacheItemPriority.Normal, Nothing) numOfActiveBugs = result End If ActiveBugs = numOfActiveBugs
    D. Dim numOfActiveBugs? As Integer = DirectCast(Cache("ActiveBugs"), Integer?) If Not numOfActiveBugs.HasValue Then Dim result As Integer = GetActiveBugs() Cache.Insert("ActiveBugs", result, Nothing, Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(30)) numOfActiveBugs = result End If ActiveBugs = numOfActiveBugs.Value

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.