Solved

App_Code directory

Posted on 2007-12-03
6
388 Views
Last Modified: 2012-06-27
In asp.net, in the App_Code directory, is there a way to separate the classes from the datasets?

Can I put in sub directories?

And if I do, how does the application know which directory to find it in?
thanks.
0
Comment
Question by:BobCSD
  • 3
  • 3
6 Comments
 
LVL 37

Expert Comment

by:samtran0331
ID: 20396451
Yes, you should be able to create a "Datasets" subdirectory under the App_Code folder.

>>And if I do, how does the application know which directory to find it in?

In general, code files in App_Data is either going to be pre-compiled by you or compiled at runtime by .Net.
I'm not quite sure if this holds true for all *.xsd files (regardless of their location), but I was able to create a Datasets folder under the App_Code folder, put a dataset.xsd file into it, and on a page in the root call it and bind it to a grid.
0
 
LVL 1

Author Comment

by:BobCSD
ID: 20396623
What about a class sub directory? or sub directories based on class functionality?

0
 
LVL 37

Accepted Solution

by:
samtran0331 earned 500 total points
ID: 20396823
Just tested by creating this folder structure:
App_Data
--Datasets
----Northwind.xsd
--MathClasses
----cMath.vb
--StringClasses
----cString.vb

And from a page in the root, I could call the Northwind dataset, and functions in both classes.

I can't find any "proof positive, here it is in black and white" documentation, but it's my understanding that the folder structure under App_Data isn't going to really matter until you start testing it against different compilation methods.
The only time the App_Data folder structure matters is when you have both C# classes and VB classes, then the class files have to be in different subfolders and you have to add to the web.config so that the runtime knows to compile one folder into VB and the other into C#
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 1

Author Closing Comment

by:BobCSD
ID: 31412355
great! thanks!
0
 
LVL 37

Expert Comment

by:samtran0331
ID: 20396919
I'm going to need to test this further.
My posts above are using a "Web Application Project" and everything is accessible and works.

I created a "Web Site" project and it isn't holding true (I'm thinking I need to pre-compile for it to work)...are you using "Web Application" or "Web Site"?
0
 
LVL 1

Author Comment

by:BobCSD
ID: 20397094
I created it with New Website and I open it with Open Website, but how would I know otherwise?

It works fine for me.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ASP.NET MVC Edit ViewModel Data 6 42
crm written in asp.net / c# 1 42
Asp.net mvc 5 5 22
Adjust the position 3 13
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

18 Experts available now in Live!

Get 1:1 Help Now