K
Kristoffer Arfvidson
Hi!
Don´t know If I ended up on the right server for this question, but Ive been looking for ever now for the answer, and please if somebody knows, please help me!
My problem is the following:
I have an aspx page, called: Page1.aspx
on top of this page I have the following written line:
<%@Page language="vb" AutoEventWireup="true" Debug="true" Trace="true" inherits="clsCodeBehindIndex" src="page1.aspx.vb" %>
ok, Now, I have a codebehind page called: Page1.aspx.vb inside witch I have for example:
imports system
imports system.web
imports system.web.ui
imports system.web.ui.webcontrols
imports system.web.ui.htmlcontrols
'imports N.clsClientInfo
public class clsCodeBehindPage
Inherits System.web.ui.page
public lbl as label
sub Page_Load(sender as object,e as eventargs)
lbl.Text = "page load in Code Behind"
end sub
end class
------------
ok, now, I have a third file called: clientinfo.vb witch is on a different dir on the server eg. "../Global/clientinfo.vb"
ok, This is a GLOBAL Class, witch will be accessed thruout the page and contains information about the current client. ok...
So, now to my question, HOW??? on earth do I connect to this class thru my codebehind page? (page1.aspx.vb) ??
I can access the page by using: <%@ Assembly src="../global/clientinfo.vb" %> (on the normal aspx page) BUT!
I cant get access to the class in the codebehind page, ONLY on my normal aspx page...
I try to access the class by typing (in the codebehind page):
Dim ClientInfo as new clsClientInfo
But I keep getting error messages...
OBS!
I cant use VS.NET since my homepage provider dosnt support dll´s, so, I need to make this work, somehow...
Any suggestions?
Please help me, I have been looking for a week now, and still havnt found any info about this...
Here comes some example code for the clientinfo.vb class:
Namespace N 'Declare the namespace N
Public Class clsClientInfo
#Region "Declarations"
Dim str_LoggedInName As String
#End Region
#Region "Logged in as (Properties)"
Property LoggedInName() As String
Get
Return str_LoggedInName
End Get
Set(ByVal Value As String)
str_LoggedInName = Value
End Set
End Property
#End Region
End Class
End Namespace
Yours: Kristoffer
P.s. Merry christmas to you all! D.s.
Don´t know If I ended up on the right server for this question, but Ive been looking for ever now for the answer, and please if somebody knows, please help me!
My problem is the following:
I have an aspx page, called: Page1.aspx
on top of this page I have the following written line:
<%@Page language="vb" AutoEventWireup="true" Debug="true" Trace="true" inherits="clsCodeBehindIndex" src="page1.aspx.vb" %>
ok, Now, I have a codebehind page called: Page1.aspx.vb inside witch I have for example:
imports system
imports system.web
imports system.web.ui
imports system.web.ui.webcontrols
imports system.web.ui.htmlcontrols
'imports N.clsClientInfo
public class clsCodeBehindPage
Inherits System.web.ui.page
public lbl as label
sub Page_Load(sender as object,e as eventargs)
lbl.Text = "page load in Code Behind"
end sub
end class
------------
ok, now, I have a third file called: clientinfo.vb witch is on a different dir on the server eg. "../Global/clientinfo.vb"
ok, This is a GLOBAL Class, witch will be accessed thruout the page and contains information about the current client. ok...
So, now to my question, HOW??? on earth do I connect to this class thru my codebehind page? (page1.aspx.vb) ??
I can access the page by using: <%@ Assembly src="../global/clientinfo.vb" %> (on the normal aspx page) BUT!
I cant get access to the class in the codebehind page, ONLY on my normal aspx page...
I try to access the class by typing (in the codebehind page):
Dim ClientInfo as new clsClientInfo
But I keep getting error messages...
OBS!
I cant use VS.NET since my homepage provider dosnt support dll´s, so, I need to make this work, somehow...
Any suggestions?
Please help me, I have been looking for a week now, and still havnt found any info about this...
Here comes some example code for the clientinfo.vb class:
Namespace N 'Declare the namespace N
Public Class clsClientInfo
#Region "Declarations"
Dim str_LoggedInName As String
#End Region
#Region "Logged in as (Properties)"
Property LoggedInName() As String
Get
Return str_LoggedInName
End Get
Set(ByVal Value As String)
str_LoggedInName = Value
End Set
End Property
#End Region
End Class
End Namespace
Yours: Kristoffer
P.s. Merry christmas to you all! D.s.