[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Slawek

2/9/2004 8:56:00 AM



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.develop... ***
Don't just participate in USENET...get rewarded for it!
1 Answer

CMA

2/9/2004 9:59:00 AM

0

as to your explanation, your files r loxcated like this...


--root
|--adminpages
| |--xxx.aspx
| |--styles.css
|
|--sysoperator/yyy.aspx

u have to copy the css in ur application root folder, that is "adminpages"
for now. (like in the above figure. i think u have this for now)
in xxx.aspx u can use...
<LINK href="styles.css" type="text/css">

in sysoperator/yyy.aspx u can use...
<LINK href="../styles.css" type="text/css">

where "../" says get the file from the previous folder.

OR you can keep css file in a seperate directory under "adminfiles" and set
the path to match it.

hope this helps,

CMA



"slawek xxxxx" <slawek7302@wp.pl> wrote in message
news:uR$H%23pu7DHA.696@tk2msftngp13.phx.gbl...
>
>
> 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.develop... ***
> Don't just participate in USENET...get rewarded for it!