473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Accessing App_Data from App_Code

Hi
I am developing an application using ASP.Net 2.0. In my code under
App_Code I would like to access the files in App_Data. Any ideas if
there is a way to get the path of this folder ?

Thanks

Nov 19 '05 #1
3 1723
Doesn't "~/App_Data" work ?

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Sushi" <su******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi
I am developing an application using ASP.Net 2.0. In my code under
App_Code I would like to access the files in App_Data. Any ideas if
there is a way to get the path of this folder ?

Thanks

Nov 19 '05 #2
No, that doesnt work. In my case the current directory when loading a
file seems to be the Visual Studio install directory.

Nov 19 '05 #3
That can't be.

"~" refers to an ASP.NET application's *virtual* directory
root and cannot possibly refer to VS's physical installation directory.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Sushi" <su******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
No, that doesnt work. In my case the current directory when loading a
file seems to be the Visual Studio install directory.

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: hummh | last post by:
Hello out there, I´m making my first steps with ASP.NET 2.0 and have he following problem: I´ve implemented a Web User Control that sits in the root of my ASP.NET Website. I want to use the...
0
by: Not Me | last post by:
Hey, Hopefully this is simple.. I've a public class in app_code, with a public shared sub in it. From VS2005, I can access the sub from another page (using intellisense) without errors...
2
by: pradeep_TP | last post by:
Hello, I am trying to use APP_CODE folder for all my class files under VS 2005. After adding APP_CODE in the solution explorer, I added a new web page by right clicking project and selecting add...
5
by: CharlesA | last post by:
hi folks I'm working on reverse engineering TheBeerHouse by Marco Bellinaso which appears to have 100% unanimous approval on Amazon. I got the book and downloaded the code and I opened the...
2
by: le0 | last post by:
guys, this is my first time to deploy website to the server, but every time i access the page this error always appears. ...
4
by: Joey | last post by:
asp.net 2/C#/VS2005 I have a web app where I use a stream writer to create a CSV (text) file. I then use my code to save the file in the site's 'App_Data' folder, in a subfolder called 'Temp'....
1
by: MING | last post by:
If i create a module inside App_Data, how can i access the web control Property on webform? Just like VB6 , i create a *.vb , the can direct access the control property like FrmMain.TextBox1.Text...
6
by: Andy Fish | last post by:
Hi, From what I can gather, under Asp.Net 2.0, it is safe to put data and config files underneath the app_data in the web root and they will not be served directly to the browser from a URL. ...
7
by: dan | last post by:
I'm working on a small Web project in VS2008. In VS2005 it was recommended that DataSet be placed in App_Data folder (the framework did that automatically). In VS2008 the framework does not give...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.