pointing to a file from aspx c#

I want my web page to point to a file, and I have placed the file in the same location as my aspx file, but when i try to look for the file, it can not find it inside teh .cs code

But this does not seem to be the case inside a aspx file, since that lookks at an image file which it does seem to find, both the image and the text file are in the same directory.

When I look at the current directory environment variable it is pointing me to a location where the webserver is but in there I do not see any of my files ...

I am not sure how i can get my cs code to point tot eh same directory to where the aspx file is actually located. Or i dont know how to add a pointer to a the file i want in the aspx file ..

any help would be appreciated ...
LVL 2
Jayesh AcharyaTechnichal ConsultantAsked:
Who is Participating?
 
morguloConnect With a Mentor Commented:
0
 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
0
 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Jayesh AcharyaConnect With a Mentor Technichal ConsultantAuthor Commented:
I dont knwo why I can not see the file when i try to run the application ...

It seems to want to look for the file  in C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\

and if i place the file in here it will see it, but I need the code to look for the file from the same location as where the aspx code is.

I dont know why I can get an image but cant see the text file in c#

<img src="picture.png" /> inside the aspx
0
 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
This did not solve my problem, but it did give me some new reading to do so in that aspect I am awarding the points, to at least give thanks fotr the help
0
 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
I have added a comment qand awarded the points, the solution did not fix the problem but i did get some usefull reading accomplished by going down the pasth suggested
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.