Solved

pointing to a file from aspx c#

Posted on 2011-09-22
6
218 Views
Last Modified: 2013-12-17
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 ...
0
Comment
Question by:jhacharya
  • 5
6 Comments
 
LVL 2

Author Comment

by:jhacharya
ID: 36582161
0
 
LVL 2

Author Comment

by:jhacharya
ID: 36582172
0
 
LVL 2

Assisted Solution

by:jhacharya
jhacharya earned 0 total points
ID: 36582216
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 5

Accepted Solution

by:
morgulo earned 500 total points
ID: 36582629
0
 
LVL 2

Author Closing Comment

by:jhacharya
ID: 36984596
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
 
LVL 2

Author Comment

by:jhacharya
ID: 36962842
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

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now