views:

251

answers:

3

If a site is a precompiled ASP.net site, is it possible to add a .aspx and .aspx.cs or aspx.vb file to the site in a new directory and have those pages work/compile on the fly?

Or do these files need to be added to the project, re-publish the site, and push the new bin folder?

+1  A: 

You can add non-precompiled pages to a precompiled web site. I have just installed a site that does exactly that - it is a precompiled site with a remote admin tool that adds some custom pages in non-precompiled format.

Matt Hamsmith
A: 

How would you know what controls should be used to build the page ? You get if off of a config or a DB ?It is possible, we are using a base page (Base.aspx) which acts like a shell The user controls which needs to be added are configured in DB and depending on the request, they are added at runtime using Page.Controls.Add (controlname). But we build these ascx controls at design time.

Edit: I happen to see this http://www.codeproject.com/KB/dotnet/dynacodgen.aspx

ram
A: 

Adding the .aspx page is not a problem since this is not precompiled, however, the aspx.cs file needs to be precompiled in your situation. You would need to update the site dll or the individual dll that "contains" the aspx.cs file.

David Glass