The short answer is "You can't conditionally include ASP code." And that answer remains unchanged.
However, you can conditionally include HTML or other non-ASP content. And you do it with some pretty simple ASP coding:
<% Set FSO = Server.CreateObject("Scripting.FileSystemObject") Set inFile = FSO.OpenTextFile( Server.MapPath( "nameOfFileToInclude.html" ) ) Response.Write inFile.ReadAll inFile.Close Set inFile = nothing %>
Do you see it? We use the FileSystemObject and simply open the file we need (the name of which could be dynamically generated or could come from a form field or or or). Then we write the entire contents of the file out to the generated Response stream in one statement! Dirt simple. Clean. And reasonably fast.