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

  • Home
  • SEARCH
  • 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 6383399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:38:41+00:00 2026-05-25T02:38:41+00:00

I could do with a little guidance if possible.. I’m building a class library

  • 0

I could do with a little guidance if possible..

I’m building a class library to contain custom web controls. I’ve transformed many of the jQuery UI elements into .NET classes for dynamic use in pages. e.g.

    Dim Msg As New Dialog("Dialog Title", New LiteralControl("Dialog Content"))
    Msg.Width.Value = 500
    Msg.Height.Value = 300
    Me.Controls.Add(Msg )

The necessary scripts get inserted into the head during CreateChildControls, and any jQuery file references are added to the head e.g.

    RegisterScriptFile("~/Scripts/jquery-1.5.1.js")
    RegisterScriptFile("~/Scripts/UI/jquery.ui.core.js")
    RegisterScriptFile("~/Scripts/UI/jquery.ui.widget.js")
    RegisterScriptFile("~/Scripts/UI/jquery.ui.mouse.js")
    RegisterScriptFile("~/Scripts/UI/jquery.ui.draggable.js")
    RegisterScriptFile("~/Scripts/UI/jquery.ui.position.js")
    RegisterScriptFile("~/Scripts/UI/jquery.ui.resizable.js")
    RegisterScriptFile("~/Scripts/UI/jquery.ui.dialog.js")

The WebControl base class handles inserting the references into the Page Head.

This is brilliant, however there’s a problem…the file paths may differ between applications which consume the control library.

My choices that I can see are:

A) Embed the files as resources within the library itself….however the CSS styling would be non-customisable between the individual aplications, and any changes to CSS/JS would need a re-compile.

B) Define and use a standardised file heirarchy. Each application needing a folder call ‘Scripts’ with a fixed file heirarchy within, so the control knows where to reference the required files. The problem I can see here is that it might not always be possible to use this standardised heirarchy and could make using the library cumbersome.

C) Create a property for each control, for each file it requires. Again this would become cumbersome and a pain to use, because each instantiated control would have to have those properties set.

D) Make some kind of ResourceUrlLibrary Dictionary like class which the consuming app can populate, then give to each control as it’s instantiated. However, this seems convoluted and could cause confusion for other developers.

If anyone has come across this problem and could spare me some guidance that would be brilliant 🙂

  • 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-25T02:38:41+00:00Added an answer on May 25, 2026 at 2:38 am

    If its a custom control, it has a reference to the Page class, which then has a method call ResolveClientUrl to generate a relative URL for you. So that can take care of that scenario. You may want to expose a ScriptsFolder property that allows you to store the path to the scripts rather than hard-coding it too.

    If this is for your own custom project, standardizing on a folder is fine, but if you are creating a common library to be reused, requiring a specific folder isn’t a good idea, and you can then use the ScriptsFolder property to remedy this, or store the folder path in the config. It’s OK to standardize on the use of an application setting.

    To confirm, I use Telerik controls, and they go the route of having a property that defines a custom path to the script (since they rely on one for a specific control), and they also have certain settings that can be overridden by adding an application setting.

    HTH.

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

Sidebar

Related Questions

This could be a little off the ballpark, but a friend asked me about
I once knew a website where the user could generate the little W3C valid
So I have a lot of projects coming that could use a little dhtml
I wrote myself a little downloading application so that I could easily grab a
OK so that title sucks a little but I could not think of anything
I'm looking for some guidance on the overall architecture of this little system I'm
Could someone recommend any good resources for creating Graphics User Interfaces, preferably in C/C++?
Could someone tell me what the units the SetTimeout(int) method in the ICriteria interface
Could somebody please do a rundown of how to programmatically encrypt a config-file in
Could anybody explain in plain words how Cloud computing works? I have read the

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.