|
-
May 16th, 2008, 02:53 AM
#1
Thread Starter
Lively Member
Relative Path
I have a flower.gif file in the given folder "C:\documents and settings\abc\Visual studio\Proj\namecontrol"
Now that on the client side, button click of an event calls this image. How to set relative path to this so that it can accessed from anywhere.
I have tried Environment.CurrentDirectory and as well as System.Reflection.Assembly.GetAssembly() methods, both did not produce the result that i need.
All that i want is to access the applciation path which is "C:\documents and settings\abc\Visual studio\Proj\" as relative path from client side
-
May 16th, 2008, 05:40 AM
#2
Frenzied Member
Re: Relative Path
Try the Server.MapPath() method.
-
May 16th, 2008, 02:12 PM
#3
Re: Relative Path
If "C:\documents and settings\abc\Visual studio\Proj\" is not mapped under IIS, then you cannot set a relative path to it.
You will need to either place this image you need in your virtual directory under the 'images' folder, or create a dynamic ASP.NET page that serves up an image by reading from the specified file location. The first option is easier
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|