Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > css stylesheets

Reply
Thread Tools

css stylesheets

 
 
slawek xxxxx
Guest
Posts: n/a
 
      02-09-2004
Hello everyone,

I have following problem : I develop asp.Net Application using web
controls. In each control I have a link to css stylesheet. If I use my
controls in pages located in two different directories (eg.
\adminpages\xxx.aspx and \adminpages\sysoperator\yyy.aspx) my controls
can't locate stylesheets. Is there any way to use a reference (in link
object) directly to main directory of the application?? Now I have :
<LINK href="CommonControls/Css/MyControl.css" type="text/css"
rel="stylesheet"> and I want to change it to something like :<LINK
href="{root}/CommonControls/Css/MyControl.css" type="text/css"
rel="stylesheet">, but I dont know how to obtain {root} path, supposing
that it's possible. Any suggetions??
Thanks in advance
Slawek



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Michael Morse
Guest
Posts: n/a
 
      02-11-2004
If you start your href path with a '/' that specifies to start at the root
so

href="/CommonControls/Css/MyControl.css" means
starting at root go to CommonControls then Css and grab file MyControl.css

hope this helps.

-mike

"slawek xxxxx" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello everyone,
>
> I have following problem : I develop asp.Net Application using web
> controls. In each control I have a link to css stylesheet. If I use my
> controls in pages located in two different directories (eg.
> \adminpages\xxx.aspx and \adminpages\sysoperator\yyy.aspx) my controls
> can't locate stylesheets. Is there any way to use a reference (in link
> object) directly to main directory of the application?? Now I have :
> <LINK href="CommonControls/Css/MyControl.css" type="text/css"
> rel="stylesheet"> and I want to change it to something like :<LINK
> href="{root}/CommonControls/Css/MyControl.css" type="text/css"
> rel="stylesheet">, but I dont know how to obtain {root} path, supposing
> that it's possible. Any suggetions??
> Thanks in advance
> Slawek
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
slawek xxxxx
Guest
Posts: n/a
 
      02-16-2004

Thanks a lot, but when I wrote <root> I mean my application root path,
not "wwwroot". In this case (using "\") if application folder will have
different name then all links will be no more valid. Mayby there is
another way to obtain root paths related to the main application
folder??

Thanks a lot for help
Slawek





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Stylesheets question Laura HTML 2 04-13-2006 10:12 AM
Validator color and css-stylesheets - a solution Hans Kesting ASP .Net 0 02-08-2005 03:09 PM
Css Stylesheets and aspx George ASP .Net 5 08-24-2004 10:20 PM
css in external stylesheets for aspx pages Rod Snyder ASP .Net 3 02-02-2004 04:01 PM
multiple CSS stylesheets: do all download? Dave Higgins HTML 12 11-22-2003 10:28 AM



Advertisments