简体   繁体   中英

Adding “On The Fly” page to precompiled ASP.Net Site

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?

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM