Include code in ASP.net
- by Tom Gullen
I've got an ASP.net file, and I'm trying to include dynamic code which was easy in classic ASP.
Here is what I have tried so far:
<%@ Register TagPrefix="TagPre" TagName="header" Src="alg/classes.aspx"%>
and
<!--#include file="alg/classes.aspx"-->
But neither of these seem to work. The content of classes.aspx is:
<script runat="server">
' Square class
Public Class square
Public sqRows As Integer 'Numbers of rows this square has
Public sqCols As Integer 'Number of columns this square has
Public sqArray(,) As Integer 'The square array
' Initialise square array to match size of canvas
Public Sub initSqArray(ByVal canvCols, ByVal canvRows)
ReDim sqArray(canvCols, canvRows)
sqRows = canvRows
sqCols = canvCols
End Sub
End Class
Thanks for any help!