Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting to the root directory??

Status
Not open for further replies.

Modica82

Technical User
Jan 31, 2003
410
GB
Hi all,

I have a very silly question. I am trying to show images from a user control that will be used my all pages which sit in different folders.

i.e. image src: /images/img1.gif

The problem is the location is not going to the root, it is going to the localhost root?? So instead of the location above being represented by:


i am getting


have i missed something, a setting in IIS?? how can i get to the root all the time from a user control? or anything for that matter.

Please help, i am stumped.

Rob

---------------------------------------
 
Use Server.MapPath and write the path to the image directory


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Hi ca8msm,

I cant use server.mappath these are just images and i want to do is set the src for those images within a user control, and for those images to appear regardless of what page the user control is (different folders and different variations of folder depth, but same header).

Anyone have any ideas??

Rob

---------------------------------------
 
And why won't Server.MapPath work for that scenario?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top