First, i'm not sure i posted this in the correct group, there is a
webcontrols group as well, my current problem applies to a custom control
for asp.net (therefore the styles of course
)
--------
The idea is that i would like to prepare self-contained controls and
therefore i don't prefer seperate css files.
I was wrong yesterday by mentioning using the server tag for each control to
add styles dynamically to each control.
I just put a styles section directly into my usercontrol html part, it works
but it's not recommended.
Styles should be in the head and preferrable as include.
Well i know that there are webresources but my knowledge about this all is
not that far yet + the usercontrol is not a compiled control since it still
depends to much on the project.
(Like database tables and fields etc + there is no need)
Therefore i choose for styles in the html, the easy way..
I'm just figuring out how to deal with things, it's not all that trivial.
And then there is the problem of recurring insertions, meaning multiple
instances of my usercontrol on the same page would then insert duplicate
styles (and javascript code) with the same name(s).
For js there is this asp.net solution to register functionality which
results into one codeblock on multiple inserts.
Maybe this is also available with styles??
There are several solutions, i'm working slowly to a better approach with
respect to the complete control, not only this styles issue.
Most of my usercontrols are never required outside the project, it would
cost to much time to make them stand-alone anyway.