Solved

App_Code directory

Posted on 2007-12-03
6
415 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
[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
  • 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 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

734 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