Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

App_Code directory

Posted on 2007-12-03
6
Medium Priority
?
429 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 2

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 2000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

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 2

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

824 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