473,498 Members | 310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Seperate c# script in a DLL file

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>
Nov 19 '05 #1
1 1262
First of all your script is a vb rather thean c# one.

Secondly, you need Inherits attribute.

Eliyahu

"RC" <rc@gmail.com> wrote in message
news:u7**************@TK2MSFTNGP10.phx.gbl...
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>

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2319
by: TonyB | last post by:
Hi, I've searched the group and need more information and guidance on this issue I need to resolve next week. I work for the local school system and I am working on a way to parse a CSV file of...
2
7775
by: A.M. de Jong | last post by:
How does MicroSoft store the stored procedures in seperate files. What tools are used. Cause that's what I like to do too. Arno de Jong, The Netherlands. (SCPTFXR does not have the option to...
7
2387
by: Jon S via DotNetMonster.com | last post by:
Hi all, I posted this yesterday but didnt explain it too well so thought I would do it again. I have a label on a form that I want to be able to change the text while I'm in a seperate class...
17
2111
by: Scot L. Harris | last post by:
I am running postgresql 7.2.4 on a Redhat 8.0 system. I have been looking for a way to setup another database besides the initial one setup under /var/lib/pgsql/data on a different file system. ...
6
1667
by: Phil Latio | last post by:
I am missing a trick here on how use variables defined in seperate file. In script 1, I have proved to myself my class is working OK because I can pass in the values and the echo statement...
8
4916
by: Jeff User | last post by:
Hello all I am working on creating a Web application I am using C# code behind ..NET1.1 Rather than navigate to a new window, I want to open a seperate IE window when the user clicks a...
7
3939
by: SHC | last post by:
I'm in need of some javascript to load two pages into two seperate iframes which are on two seperate and different pages. Rather complicated I know (and easier done in one frameset), but caused...
4
1461
by: buggtb | last post by:
This may be a blindingly obvious question but I am working on a little project and I'm relatively new to PHP. What I am wanting to do it load a load of data from an array into a table generated by...
7
2578
by: lancewassing | last post by:
I'm hoping this question is simple. I am trying to create a login script for my already in place client manage using php. I have created a text file filled with usernames and passwords delimited by...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4904
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.