News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;

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?

  1. Place the JavaScript in a file named controls.js and add the following code line to the Page_Load method of each control.

    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "script", "controls.js");
    
  2. Add the following code line to the Page_Load method of each control, where strJavascript contains the JavaScript code for the control.

    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "script", strJavascript);
    
  3. Add the following code line to the Page_Load method of each control, where CLASSNAME is the name of the control class and strJavascript contains the JavaScript code for the control

    Page.ClientScript.RegisterStartupScript(typeof(CLASSNAME), "script", strJavascript);
    
  4. Add the following code line to the Page_Load method of each control, where CLASSNAME is the name of the control class and strJavascript contains the JavaScript code for the control.

    Page.ClientScript.RegisterClientScriptBlock(typeof(CLASSNAME), "script", strJavascript);
    
Answer: Answer is d
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;