By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

class file in asp.net version 2.0

P: n/a
I am unable to make a class file in asp.net in version2.0 . when i
make a class file class1.cs it gives the message it should be in App
folder. First of all u tell me what is app folder. but when i create
file in app folder it does not work why. why it is different from
version 1.1
help me plz
Thanks in advance

Jun 5 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Assuming you are using VS 2005:

1. From the solution explorer, right-click on the project and select Add
ASP.NET Folder and click App_Code
2. Again from the sol. explorer, right-click App_Code and click Add New
Item... and select Class.

Alternatively, when you try to add a new item (class) at the project level,
simply click Yes on the dialog that asks whether you want to create the new
class in the App_Code.

<msdn>
App_Code - Contains source code for utility classes and business objects
(for example, .cs, .vb, and .jsl files) that you want to compile as part of
your application. In a dynamically compiled application, ASP.NET compiles the
code in the App_Code folder on the initial request to your application. Items
in this folder are then recompiled when any changes are detected.
....
</msdn>

"vi******@gmail.com" wrote:
I am unable to make a class file in asp.net in version2.0 . when i
make a class file class1.cs it gives the message it should be in App
folder. First of all u tell me what is app folder. but when i create
file in app folder it does not work why. why it is different from
version 1.1
help me plz
Thanks in advance

Jun 5 '07 #2

P: n/a
Hello vi******@gmail.com,

Just to add to Siva's post, App_Code in the way to divide your presentation
code from the other code, which loosely coupled with it.
With this way using MCV/MVP patterns are very good approach

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
I am unable to make a class file in asp.net in version2.0 . when i
make a class file class1.cs it gives the message it should be in App
folder. First of all u tell me what is app folder. but when i create
file in app folder it does not work why. why it is different from
version 1.1
help me plz
Thanks in advance

Jun 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.