ASP.Net PAge SRC Directive - Class calling another class

T

tom

My clients hosting company (BT!!) will not allow pre-compiled code so
I am having to use the src page directive. I thought this wouldnt eb
a big problem! Bit mistake. However, I am getting there.

I have the following setup and the items are called one after another:

default.aspx - My Page!
default.vb - My Codebhind page (accessed via the src directive)
clsBLL - My Business Logic Layer
clsData - My Data Layer

I have added the following to default.aspx:

<%@ Import Namespace="System.Data" %>
<%@ Assembly Src="clsData.vb" %>
<%@ Assembly Src="clsBLL.vb" %>
<%@ Page src="default.aspx.vb" Inherits="_2CDesign._default"%>

However; whenever I run default.aspx I get the following error:

BC30002: Type 'clsData' is not defined.

Its almost like I need to add a <%@ Assembly Src="clsData.vb" %> line
of code into clsBLL, how do I do this? Or how do I let clsBLL see
clsData?
 
G

Guest

My clients hosting company (BT!!) will not allow pre-compiled code so
I am having to use the src page directive. I thought this wouldnt eb
a big problem! Bit mistake. However, I am getting there.

I have the following setup and the items are called one after another:

default.aspx - My Page!
default.vb - My Codebhind page (accessed via the src directive)
clsBLL - My Business Logic Layer
clsData - My Data Layer

I have added the following to default.aspx:

<%@ Import Namespace="System.Data" %>
<%@ Assembly Src="clsData.vb" %>
<%@ Assembly Src="clsBLL.vb" %>
<%@ Page src="default.aspx.vb" Inherits="_2CDesign._default"%>

However; whenever I run default.aspx I get the following error:

BC30002: Type 'clsData' is not defined.

Its almost like I need to add a <%@ Assembly Src="clsData.vb" %> line
of code into clsBLL, how do I do this? Or how do I let clsBLL see
clsData?

I suppose you need to add

<%@ Assembly Name="clsData" %>
<%@ Assembly Name="clsBLL" %>
 
B

bruce barker

if you are using 2.0, then put the shared code file in the app_code
folder. thats all you need to do.

-- bruce (sqlwork.com)
 
T

tom

I have done that now I am getting the following error in my class when
I try and run it

Type 'Exception' is not defined.

I have added the following to the top of my page

<%@ Import Namespace="System" %>

Why can my class not see this? I also got an error on the IsNothing
function but I changed that to variable is nothing? Weird eh?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top