?
Solved

pointing to a file from aspx c#

Posted on 2011-09-22
6
Medium Priority
?
227 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
Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

 
LVL 5

Accepted Solution

by:
morgulo earned 2000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 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