[RESOLVED] Including External .NET File in HTML File

liunx

Guest
Say I have a file named sample.aspx that is sitting on my server that reads as follows :

<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Runtime.Serialization" %>
<%@ Import Namespace="System.Runtime.Serialization.Formatters.Binary" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script runat="server">
Public Function runInfo(usrName)
Response.Write(usrName)
End Function
</script>

Is there a way to include it in an HTML page, say sample.html so that the script will run on server side and post the results on the HTML page?

So say I call an include command of some sort that calls sample.aspx?usrName=Me, then I would want the HTML page to show Me as the output.Not really, unless you do something like use a iframe or some fancy Javascript or you write a custom httphandler for .Net that will execute .html files as if they were .aspx files. Other than that, I don't think there is a way.

Am I right in guessing that you have some old .html file that needs something dynamic and someone is telling you that if the name is changed the world will end?
 
Top