nerdexam
Microsoft

70-515 · Question #15

You are implementing custom ASP.NET server controls. You have a base class named RotaryGaugeControl and two subclasses named CompassGaugeControl and SpeedGaugeControl. Each control requires its own…

The correct answer is D. Add the following code line to the Page_Load method of each control, where CLASSNAME is. See the full explanation below for the reasoning.

Question

You are implementing custom ASP.NET server controls. You have a base class named RotaryGaugeControl and two subclasses named CompassGaugeControl and SpeedGaugeControl. Each control requires its own client JavaScript code in order to function properly. The JavaScript includes functions that are used to create the proper HTML elements for the control. You need to ensure that the JavaScript for each of these controls that is used in an ASP.NET page is included in the generated HTML page only once, even if the ASP.NET page uses multiple instances of the given control. What should you do?

Options

  • APlace the JavaScript in a file named controls.js and add the following code line to the
  • BAdd the following code line to the Page_Load method of each control, where strJavascript
  • CAdd the following code line to the Page_Load method of each control, where CLASSNAME
  • DAdd the following code line to the Page_Load method of each control, where CLASSNAME is

How the community answered

(41 responses)
  • A
    2% (1)
  • B
    15% (6)
  • C
    7% (3)
  • D
    76% (31)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice