DSimmon
DSimmon

Reputation: 11

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?

Upvotes: 1

Views: 1382

Answers (3)

ram
ram

Reputation: 11626

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

Upvotes: 0

David Glass
David Glass

Reputation: 2384

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.

Upvotes: 0

Matt Hamsmith
Matt Hamsmith

Reputation: 4016

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.

Upvotes: 1

Related Questions