N
~~~ .NET Ed ~~~
That is the question indeed!. It is not the first time I make some sort of
web control that depends on some
CSS styles. Usually one would go around using the CssStyle property of the
HTML markup to do some
inline styles. But my situation is that these styles I need:
a) are a little too big to do inline
b) the same CSS style is used in multiple tags, thus doing it inline
clutters the output
c) By having it global (in the HEAD part) it is made available for *all* the
instances of the
control on the same page.
So, how do I go about having my custom control "inject" either a <style>
section, or a <link rel...>
reference to a stylesheet in the HEAD section? This would come pretty handy
to me but so far
I have not seen this.
Along the same lines, the same issue arises when a control uses some "heavy"
JavaScript that is better
"concealed" (the less clutter the better) in a reference to a javascript
stored in a separate file by
adding the reference to the .js in the HEAD section. This issue has come to
me in the past as well.
Any input is greatly appreciated.
Thx,
E.
web control that depends on some
CSS styles. Usually one would go around using the CssStyle property of the
HTML markup to do some
inline styles. But my situation is that these styles I need:
a) are a little too big to do inline
b) the same CSS style is used in multiple tags, thus doing it inline
clutters the output
c) By having it global (in the HEAD part) it is made available for *all* the
instances of the
control on the same page.
So, how do I go about having my custom control "inject" either a <style>
section, or a <link rel...>
reference to a stylesheet in the HEAD section? This would come pretty handy
to me but so far
I have not seen this.
Along the same lines, the same issue arises when a control uses some "heavy"
JavaScript that is better
"concealed" (the less clutter the better) in a reference to a javascript
stored in a separate file by
adding the reference to the .js in the HEAD section. This issue has come to
me in the past as well.
Any input is greatly appreciated.
Thx,
E.