Gridview1rowupdating code in asp net

13-Feb-2015 13:46 by 6 Comments

Gridview1rowupdating code in asp net

If your Web site project includes code that you want to share between pages, you can keep the code in one of two special folders underneath the root of your Web application: compiled code (files) go in the Bin folder and source code goes in the App_Code folder.When you create these folders and store particular types of files in them, ASP. For information about how these folders work in Web application projects, see App_Code folder doesn't work with Web Application Projects on Vishal Joshi's blog.

This includes single-file user controls and user controls that use the code-behind model.The App_Code folder and its special status in an ASP.NET Web application makes it possible to create custom classes and other source-code-only files and use them in your Web application without having to compile them independently.You can copy the compiled assembly to the Bin folder of your Web application and the class is then available to all pages.Assemblies in the Bin folder do not need to be registered.Be wary of compiled code until you have tested it and are confident that you understand what it does.

Note these security aspects of putting compiled code into the Bin folder: In a Web site project, you can store source code in the App_Code folder, and it will be automatically compiled at run time.

Examples include (Web service description language) files and XML schema (.xsd) files. You can organize your source code in any way that you find convenient, and ASP.

NET will still compile all of the code into a single assembly that is accessible to other code anywhere in the Web application.

The following example illustrates how you would configure subfolders named VBCode and CSCode to compile into separate assemblies: The references to the VBCode and CSCode subfolders do not need to include any information about what programming language is contained in the subfolder. NET infers the compiler to use based on the files in the subfolder.

Security issues with code in the App_Code folder are essentially the same as those with code in the Bin folder—the code is compiled into an assembly at runtime.

For example, the App_Code folder cannot include source code in both Visual Basic and C#.