PC Review


Reply
Thread Tools Rate Thread

class file in asp.net version 2.0

 
 
vinodkus@gmail.com
Guest
Posts: n/a
 
      5th Jun 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2l2YSBN?=
Guest
Posts: n/a
 
      5th Jun 2007
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>

"(E-Mail Removed)" 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
>
>

 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      5th Jun 2007
Hello (E-Mail Removed),

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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't specify a location for new class code file on class diagram>new class dialog? Andy B Microsoft C# .NET 3 14th Feb 2008 01:57 AM
How to create an instance of user control in a class(simple) file notin Page class file? chandan Microsoft ASP .NET 2 3rd Dec 2007 06:01 AM
How do I create partial class to be nested under the main class file? Joseph Geretz Microsoft C# .NET 2 29th Mar 2007 03:42 AM
Is there a structure/class to store meta-info of a class so that I can generate code to a file? A.Neves Microsoft C# .NET 1 12th Apr 2006 06:50 PM
NullReferenceException in call from c# class to c++ static class when touch web.config file AAguiar Microsoft ASP .NET 2 9th Jan 2004 12:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:17 AM.