April 5, 2005

Codebehind To Inline In Visual Studio

Tried a simple trick. Used Visual Studio to create a dummy web application. Changed the 'Codebehind' directive in the 'Global.asax' and 'WebForm1.aspx' files to 'Src' and the web page would load from IE without any compiling or anything. First off I just copied the 'aspx' and 'aspx.cs' file to another directory and then changed the 'Codebehind' to 'Src' and that worked as well. A simply deploy could just be to copy the files to a target directory and change the 'Codebehind'. http://www.google.com/search?q=Web+Forms+Code+Model - Web Forms Code Model. Explains COdebehind and the Single file asp.net model http://www.dotnetjunkies.com/Tutorial/3623050C-B046-4E7B-A2C7-0934F1105312.dcik - The @ Page Directive - Inherits vs.Src vs. Codebehind Codebehind is a Visual Studio attribute not a .NET attribute, it is used to track the class file associated with the form http://www.wilsondotnet.com/Demos/Generator.aspx - Generates code for a web page

No comments: