473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

ASP.Net PAge SRC Directive - Class calling another class

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?

Jun 11 '07 #1
3 2367
On Jun 11, 10:11 pm, t...@iostudios.co.uk wrote:
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" %>

Jun 11 '07 #2
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)
to*@iostudios.co.uk wrote:
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?
Jun 12 '07 #3
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?

Jun 12 '07 #4

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

Similar topics

13
by: RainBow | last post by:
Hi everyone, (Very Sorry, if this is the wrong group in which I am posting this query). Code snippet: //C library typedef int (*PFunc)(int* aArg); void call_c_foo(PFunc aPtrtoFunc) {
10
by: Davíð Þórisson | last post by:
Please can someone tell me how on earth to create an instance of my top level (base) Page class so that I can access it's objects from an user control?? Someone told me public myParent =...
2
by: rjack | last post by:
I'm using VS 2005 Beta 2. In VS 2003, the Page directive in an aspx page has Language and CodeBehind attributes. You can have the language be different than the code behind file language. For...
3
by: Nick Zdunic | last post by:
Just loaded up ASP.Net 2.0 and found that I can't refer to a specific web page class from another class. For example: Partial Public Class _Default Inherits System.Web.UI.Page End Class
6
by: evandelagrammaticas | last post by:
Hi all. I have spent the better part of a day scouring the newsgroups and I am sure that I must have come across the solution a number of times - but I am still a real newbie at asp.net so please...
2
by: mikepolitowski | last post by:
Hi folks, I am have been trying to solve this problem for quite some time now and would appreciate any advice. I have been trying to call a code-behind function that is defined in my aspx.cs...
5
by: Fernando Chilvarguer | last post by:
I'm sure this has come up before but I could not find any post on it. How can I read a variable or property that has been set on a ASPX page from inside a ASCX control. ASPX code: public...
4
by: Suresh | last post by:
Is there any way to access the custom properties of a master page from the aspx form? I know the custom properties of a master page can be accessed from the aspx.cs partial class by specifying...
4
by: senfo | last post by:
This is probably a really stupid question, but what exactly is the <%@ Page %directive? I thought I knew the answer to this, but now I'm not so sure that I do. Essentially, what I'd hope to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.