planetscott
05-01-2003, 01:39 AM
Hello,
In programming ASP, I often used "includes" files to
store subroutines and functions used in many pages. I cannot seem to get this model to work in ASP.net. What am I missing?
Example - Does Not Work
File index.aspx
<script runat="server">
DoThis()
</script>
<!--#include file=code.ascx-->
File code.ascx
<script runat="server">
Sub DoThis()
Do some things here
End Sub
</script>
But this works just fine
File index.aspx
<script runat="server">
DoThis()
Sub DoThis()
Do some things here
End Sub
</script>
In programming ASP, I often used "includes" files to
store subroutines and functions used in many pages. I cannot seem to get this model to work in ASP.net. What am I missing?
Example - Does Not Work
File index.aspx
<script runat="server">
DoThis()
</script>
<!--#include file=code.ascx-->
File code.ascx
<script runat="server">
Sub DoThis()
Do some things here
End Sub
</script>
But this works just fine
File index.aspx
<script runat="server">
DoThis()
Sub DoThis()
Do some things here
End Sub
</script>