Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6567921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:23:39+00:00 2026-05-25T14:23:39+00:00

Does the Ajax Extender control base provide dependency management? I am creating a set

  • 0

Does the Ajax Extender control base provide dependency management? I am creating a set of controls that uses a few base scripts used by the behaviors and from here Creating a Extender Control it sort of looks i will have to include my base script in every single control code. So does the extender base serve the same script[a cached one] for each control or same script is served for each control.

For example i am developing controls that depend on jQuery. Since i am developing extender controls i will have to implement this method from the interface like below, notice the jquery script!

protected override IEnumerable<ScriptReference> GetScriptReferences()
{
    ScriptReference reference = new ScriptReference();
    reference.Path = ResolveClientUrl("jQuery.js");
    reference.Path = ResolveClientUrl("FocusBehavior.js");
    return new ScriptReference[] { reference };
}

now i will have same jquery script in another control, so does this mean they are served twice if both control are in same page?
Also another question,

How do make the extender control output the production scripts instead of the debug scripts
Also registering script with scriptmanager is not a option for me as i use masterpage that doesn’t need a script manager.

Some Specs:

Developed in VS2005

.NET 2.0, ASP.NET 2.0

Script Dependency on Sizzle, emile.js, spine.js these are base scripts required for all controls

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:23:40+00:00Added an answer on May 25, 2026 at 2:23 pm

    I believe the ASP.NET framework does properly handle duplicate ScriptReference objects in its rendering process since ASP.NET controls can exist in multiple instances on your page.

    For example, in an ASP.NET page you can do:

    <act:Calendar runat="server" ID="calendar1"/>
    <act:Calendar runat="server" ID="calendar2"/>
    

    both of those controls rely upon the same scripts, but the framework doesn’t load them twice.

    In your situation, you would probably want to do something like:

    protected override IEnumerable<ScriptReference> GetScriptReferences()
    {
        List<ScriptReference> references = new List<ScriptReference>();
    
        #if DEBUG
        // Load Debug Version
        references.Add(new ScriptReference(ResolveClientUrl("~/Path_To_Your_Debug_JS.js"));     
        #else
        // Load Minified Version
        references.Add(new ScriptReference(ResolveClientUrl("~/Path_To_Your_Release_JS.js"));
        #endif
    
        return references;
    }
    

    This should allow you to serve either the Debug or Release(minified) versions of your Javascript files depending upon being in either Debug or Release modes.

    I’m not sure about your comment about your MasterPage not needing a ScriptManager. I’ll assume that you have some sort of mechanism that deals with handling the responsibilities of the ScriptManager like calling the GetScriptReferences() method on your controls and handling the rendering of those script tags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small JS function that does Ajax for me and another like
I need to write a sophisticated website that does AJax, drag and drop, component
I'm using jQuery. I have website feature that does an ajax search and returns
What advantage does AJAX have over standard client server applications that use HTML and
I'd like to write myself a simple script that uses AJAX to load the
I have a jquery block that does some ajax stuff like this: $.ajax({ url:
I have a script that does an ajax request out on a keyup event
I have a asp.net ajax slideshow extender that I have hijacked and turned into
I have a user control that is pretty basic. It contains several TextBox controls,
I have a JS function that does a ajax GET (datatype: JSON) to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.