Embed .aspx page to Div tag : The Official Microsoft ASP.NET Forums:
Apr 29, 2010 09:12 AM|LINK


<%
    Response.WriteFile("demo.aspx");
%>

Is that The Wrong Way to do things?  Yes, but when you're developing pages outside of the full MVC regalia, well, it's the quickest. I don't really want to set up PartialView stuff just to fine-tune some javascript.  Thanks, um, Anaksunamun.

EDIT 20140409: That's all wrong.  WriteLine literally (and only) shoves the file in.  If you have code to process in the embedded file, it won't display.  That is, if I WriteFile another aspx page that itself has a WriteFile call, it'll pop out like...
<% Response.WriteFile("WorkflowTemplate.aspx") %>
... in your page, rather than actually writing the nested aspx file.

To painfully replicate Classic ASP's pretend version of OO, you use "the <!--#include file="xxx.ext" --> directive".

Poof. Welcome back to 1998.

Labels: ,