<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d601588505461698440', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks

The ASP.NET 2.0 Special Folders

Key points about the ASP.NET 2.0 Special Folders & specifically App_Code folder, compiled from MSDN docs for easy reference:

  1. ASP.NET recognizes certain folder names that you can use for specific types of content & the names of these special folders are reserved. The reserved folder names and the type of files that the folders typically contain are listed below:
    • App_code : Shared application code (.cs, .vb, and .jsl files & also .wsdl and .xsd files)
    • App_globalresources : Common resource files (.resx and .resources files)
    • App_localresources : Localized resource files (.resx and .resources files)
    • App_webreferences : Links to web services (.wsdl, .xsd, .disco and .discomap files)
    • App_data : Local databases for membership, web parts, etc. (.mdf and .xml files)
    • App_browsers : Browser specific settings (.browser files)
    • App_themes : Theme settings (.skin and .css files, as well as image files and generic resources)
    • Bin : Referenced assemblies (.dll files)
  2. Except App_Themes, these directories are protected against web access at the ISAPI layer linking ASP.NET to IIS.
  3. The App_Code folder works much like the Bin folder, except that you can store source code in it instead of compiled code.
  4. The App_Code folder can contain source code files (*.vb, *.cs etc) & also files that are not explicitly in a specific programming language like .wsdl (Web service description language) files and XML schema (.xsd) files for ASP.NET to compile them into assemblies.
  5. The App_Code folder can contain as many files and subfolders as you need. ASP.NET will still compile all of the code into a single assembly that is accessible to other code anywhere in the Web application.
  6. Because the source code in the App_Code folder is compiled into a single assembly, all the files in the App_Code folder must be in the same programming language. You can however configure your Web application to treat subfolders of the App_Code folder as separate compilable units.
  7. User controls are not allowed in the App_Code folder.
  8. ASP.NET infers which compiler to invoke for the App_Code folder based on the files it contains.


Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »


Post a Comment