Auto-generate WebControls

Posted by Adrian K on Stack Overflow See other posts from Stack Overflow or by Adrian K
Published on 2010-06-01T10:08:19Z Indexed on 2010/06/01 10:23 UTC
Read the original article Hit count: 293

I want to generate .net code from a template so that it more rapid, so lazy developers (and I mean that in the nicest possible way!) don't have to write them in the IDE, compile them, etc...

I know I can roll my own tool which generates the code using reflection (by reading in some text file, etc), but I just wondered if there was an easier than starting from scratch since this is what ASP.NET basically does already; so is there anyway to leverage this?

E.g. to quote Peter A. Bromberg:

Even an ASPX page with no code on it gets turned into an instance of the System.Web.UI.Page class. The page is parsed by the ASP.NET engine when it is first requested, and then its JIT compiled version is cached in the Temporary ASP.NET Files folder as long as the application is running and the .aspx page hasn't been changed.

Ideally I want to auto-generate WebControls, but examples of anything closely related will do. C# Examples preferred also, but anything considered :)

© Stack Overflow or respective owner

Related posts about .NET

Related posts about ASP.NET