Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. recommendation for adding the class file

recommendation for adding the class file

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sonia Gupta
    wrote on last edited by
    #1

    u r attempting to add a class to asp.net application , for a class to be generally consumable to ur site , it should be placed inside the app_code folder , would u like to place the class in the app_code folder Why it is recommended?

    Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

    E R N V 4 Replies Last reply
    0
    • S Sonia Gupta

      u r attempting to add a class to asp.net application , for a class to be generally consumable to ur site , it should be placed inside the app_code folder , would u like to place the class in the app_code folder Why it is recommended?

      Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2

      not sure why But I tend to have my class files in the main folder next to my aspx files Then any common method files I put in the app_code folder

      1 Reply Last reply
      0
      • S Sonia Gupta

        u r attempting to add a class to asp.net application , for a class to be generally consumable to ur site , it should be placed inside the app_code folder , would u like to place the class in the app_code folder Why it is recommended?

        Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

        R Offline
        R Offline
        rahul net11
        wrote on last edited by
        #3

        It is not compulsory to put class file in app_code folder. You can put it anywhere in your project but it is better you put it in app_code foler because its easy for you to access thls file in project. if you put class file outisde the folder and when u r trying to access it in codebehind it throw error "Compilation error as it no longer recognize ur class in CodeBehind" Hope this help..

        People Laugh on me Because i am Different but i Laugh on them Because they all are same.

        1 Reply Last reply
        0
        • S Sonia Gupta

          u r attempting to add a class to asp.net application , for a class to be generally consumable to ur site , it should be placed inside the app_code folder , would u like to place the class in the app_code folder Why it is recommended?

          Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Sonia Gupta wrote:

          would u like to place the class in the app_code folder

          I used to create separate projects for keeping my classes and refer that projects dll in ASP.NET application. I used to keep classes inside app_code folder too as it's a recommended practice since .NET 2.0. There are many advantages for keeping class in app_code, few of them are 1 - All pages in your application can access the classes in app_code 2 - All the classes in app_code are compiled into a single assembly.

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

          1 Reply Last reply
          0
          • S Sonia Gupta

            u r attempting to add a class to asp.net application , for a class to be generally consumable to ur site , it should be placed inside the app_code folder , would u like to place the class in the app_code folder Why it is recommended?

            Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

            V Offline
            V Offline
            Vasudevan Deepak Kumar
            wrote on last edited by
            #5

            Check out this: http://www.dotnetjunkies.ddj.com/QuickStartv20/aspnet/doc/pages/code.aspx[^]

            Vasudevan Deepak Kumar Personal Homepage
            Tech Gossips
            A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups