Solved

App_Code directory

Posted on 2007-12-03
6
391 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:Starr Duskk
  • 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:Starr Duskk
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Closing Comment

by:Starr Duskk
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:Starr Duskk
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP:DataGrid and how to bind to a BoundColumn 8 38
Jquery autocomplete 10 68
Data is not showing from images 15 37
Split in Javascript 5 31
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

22 Experts available now in Live!

Get 1:1 Help Now