Solved

pointing to a file from aspx c#

Posted on 2011-09-22
6
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

691 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