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

    You create a Web page that contains the following code. (Line numbers are included for reference only.)

    01

    07

    Welcome!

    08

      09

    • Black
    • 10

    • Red
    • 11

    You need to ensure that when the user clicks an item in the list, the text color of the Welcome! message will change.

    Which declaration should you use?

    A. BlackRed
    B. BlackRed
    C. RedBlack
    D. RedBlack

  • Question 42:

    You are developing an ASP.NET Web page.

    You add the following markup to the page.

    You add the following code segment to the code-behind. (Line numbers are included for reference only.)

    01 protected void btnUpload_Click(object sender,

    EventArgs e)

    02 {

    03 if ()

    04 {

    05 string saveName = Path.Combine(@"c:\uploadedfiles\", FileUpload1.FileName); 07 lblFeedback.Text = "File successfully uploaded.";

    08 }

    09 else

    10 {

    11 lblFeedback.Text = "File upload failed.";

    12 }

    13 }

    You need to save the uploaded file and display a message to the user that indicates that the upload either succeeded or failed.

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

    A. Replace line 03 with the following code segment. if (FileUpload1.HasFile)
    B. Replace line 03 with the following code segment. if (FileUpload1.FileContent.Length > 0)
    C. Insert the following code segment at line 06. FileUpload1.SaveAs(saveName);
    D. Insert the following code segment at line 06.FileUpload1.FileContent.CopyTo(new FileStream (saveName, FileMode.Open));

  • Question 43:

    You are implementing an ASP.NET Web site. The site uses a component that must be dynamically configured before it can be used within site pages.

    You create a static method named SiteHelper.Configure that configures the component. You need to add a code segment to the Global.asax file that invokes the SiteHelper.Configure method the first time, and only the first time, that any page

    in the site is requested.

    Which code segment should you use?

    A. void Application_Start(object sender, EventArgs e){SiteHelper.Configure();}
    B. void Application_Init(object sender, EventArgs e){SiteHelper.Configure();}
    C. void Application_BeginRequest(object sender, EventArgs e) {SiteHelper.Configure();}
    D. Object lockObject = new Object();void Application_BeginRequest(object sender, EventArgs e) {lock (lockObject()){SiteHelper.Configure();}}

  • Question 44:

    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. int numOfActiveBugs = (int)Cache["ActiveBugs"];if (!numOfActiveBugs.HasValue){int result = GetActiveBugs();Cache.Insert("ActiveBugs", result, null,DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration);numOfActiveBugs = result;}ActiveBugs = numOfActiveBugs.Value;
    B. int numOfActiveBugs = (int) Cache.Get("ActiveBugs");if (numOfActiveBugs != 0){int result = GetActiveBugs();Cache.Insert("ActiveBugs", result, null,DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration);numOfActiveBugs = result;} ActiveBugs = numOfActiveBugs;
    C. int numOfActiveBugs = 0;if (Cache["ActiveBugs"] == null){int result = GetActiveBugs();Cache.Add ("ActiveBugs", result, null, DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration,CacheItemPriority.Normal, null); Cache.NoSlidingExpiration, CacheItemPriority.Normal, null);numOfActiveBugs = result;}ActiveBugs = numOfActiveBugs;
    D. int numOfActiveBugs = (int?)Cache["ActiveBugs"];if (!numOfActiveBugs.HasValue){int result = GetActiveBugs();Cache.Insert("ActiveBugs", result, null,Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(30));numOfActiveBugs = result;}ActiveBugs = numOfActiveBugs.Value;

  • Question 45:

    Which property of the Label control gets\sets the identifer for a server control that the Label control is associated with?

    A. ClientID
    B. ID
    C. AssociatedControlID
    D. ControlID

  • Question 46:

    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();

  • Question 47:

    You are implementing an ASP.Net web page that includes a Treeview control. You need to ensure that the TreeView control nodes are populated only when they are first expanded. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

    A. Set the PopulateNodesFromClient property of the TreeView control to true.
    B. Add an event handler to the TreeNodeDataBound event that includes code to populate the node.
    C. Set the PopulateOnDemand property of the TreeNode control to true.
    D. Add an event handler to the TreeNodePopulate event than includes code to populate the node.

  • Question 48:

    You're developing an ASP web page. the pages requires access to types that are defined in an assembly named Contoso.businessobjects.dll. You need to ensure that the page can access these types.

  • Question 49:

    You are implementing an ASP.NET Web page

    The page includes several controls, but only a GridView requires view state. You set the GridView... You need to ensure that the page will omit unneeded view state.

    Wich @ Page directive should you use?

  • Question 50:

    You are implementing a Web page that allows users to upload files to a Web server. The page includes a form that has a Submit button. You need to reject files larger than 1 MB. What should you do?

    A. Add an HTML input type= file control. Add an onSubmit handler to the form to check the file size and cancel the form submission if the file size is too large.
    B. Add an HTML input type= file control. Add an onChange handler to the input control to check the file size and cancel the upload if the file size is too large.
    C. Add an ASP.NET FileUpload control and configure it to run on the server. Add a server-side OnClick handler to the form's Submit button to save the file only if the file size is allowed.
    D. Add an ASP.NET FileUpload control and configure it to run on the server. Add a server-side OnDataBinding handler that saves the file only if the file size is allowed.

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.