Yes, I know that the < ! -- Include -- > would work, however, that is exectued BEFORE any logic or conditional statements are executed - so if I wanted to check for a URL parameter to specify page a or b, the code would include either a.aspx or b.aspx, whereas would include them both.
This can be a problem when rendering .NET controls - where some objects like the main form cannot be duplicated. I have run into this when re-writing the main page for our portal - this little snippet has allowed me to build a dynamic templating engine for a 'locked' portal from our ERP vendor and completely re-work the way in which the portal functions.
So yes, I know about < ! -- Include -- > but it does have limitations...
This can be a problem when rendering .NET controls - where some objects like the main form cannot be duplicated. I have run into this when re-writing the main page for our portal - this little snippet has allowed me to build a dynamic templating engine for a 'locked' portal from our ERP vendor and completely re-work the way in which the portal functions.
So yes, I know about < ! -- Include -- > but it does have limitations...
<%@ Import Namespace="System.Net" %>
<script language="c#" runat="server" Debug="true">
private void Page_Load(object sender, System.EventArgs e)
{
WebClient webClient = new WebClient();
byte[] response = webClient.DownloadData("http://www.someserver.com");
Response.Write(Encoding.Default.GetString(response));
}
</script>
I've got good news, and I've got bad news:
The universe is merely a figment of my imagination.
Now are you ready for the bad news?