R
RC
Hi,
Can I seperate the following script block in a sperate DLL file instead of
embedded in aspx/ascx?
I know codebehind/src attribute can do it, but I found that it can't trigger
"Page_Load" event if I seperate and compile the code into DLL file
<script runat="server">
Sub Page_Load( )
'NB1.CreateBlankFile( )
End Sub
</script>
Sample Code:
<%@ Page Language="vb" %>
<%@ Register TagPrefix="aspnetian" Namespace="aspnetian"
Assembly="NavBar" %>
<html>
<head>
<script runat="server">
Sub Page_Load( )
'NB1.CreateBlankFile( )
End Sub
</script>
</head>
<body>
<table border="1" width="100%" cellpadding="20" cellspacing="0">
<tr>
<td align="center" width="150">
<img src="aspnetian.jpg"/>
</td>
<td align="center">
<h1>NavBar Control Client Page<h1>
</td>
</tr>
<tr>
<td width="150">
<form runat="server">
<aspnetian:NavBar id="NB1"
showdividers="False" runat="server">
<strong>Navigation Bar</strong>
<br/>
</aspnetian:NavBar>
</form>
</td>
<td>
This is where page content might be placed
<br/><br/><br/><br/><br/><br/><br/><br/><br/>
</td>
</tr>
</table>
</body>
</html>
Can I seperate the following script block in a sperate DLL file instead of
embedded in aspx/ascx?
I know codebehind/src attribute can do it, but I found that it can't trigger
"Page_Load" event if I seperate and compile the code into DLL file
<script runat="server">
Sub Page_Load( )
'NB1.CreateBlankFile( )
End Sub
</script>
Sample Code:
<%@ Page Language="vb" %>
<%@ Register TagPrefix="aspnetian" Namespace="aspnetian"
Assembly="NavBar" %>
<html>
<head>
<script runat="server">
Sub Page_Load( )
'NB1.CreateBlankFile( )
End Sub
</script>
</head>
<body>
<table border="1" width="100%" cellpadding="20" cellspacing="0">
<tr>
<td align="center" width="150">
<img src="aspnetian.jpg"/>
</td>
<td align="center">
<h1>NavBar Control Client Page<h1>
</td>
</tr>
<tr>
<td width="150">
<form runat="server">
<aspnetian:NavBar id="NB1"
showdividers="False" runat="server">
<strong>Navigation Bar</strong>
<br/>
</aspnetian:NavBar>
</form>
</td>
<td>
This is where page content might be placed
<br/><br/><br/><br/><br/><br/><br/><br/><br/>
</td>
</tr>
</table>
</body>
</html>