Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't inherit classes

Status
Not open for further replies.

blueindian1

Programmer
Apr 24, 2001
150
US
hello,

i've written several classes under the namespace "theblueindian.uploadaccess" using this syntax:
Code:
Namespace theblueindian.UploadAccess


    Public Class FileForm : Inherits GenericPage
    .
    .
    .
    .
    .
    End Class
End Namespace



my problem is that when i try to inherit from them in an aspx page using this syntax:
Code:
<%@ Page language=&quot;c#&quot; Codebehind=&quot;file.aspx.cs&quot; AutoEventWireup=&quot;false&quot;
	Inherits=&quot;theblueindian.UploadAccess.FileForm&quot; %>

i get this error:

Code:
Parser Error Message: Could not load type 'theblueindian.UploadAccess.DefaultForm'.


do i have to do anything special to make this work?

 
I think the codebehind file has to inherit the webform..

In your codebehind file though you should be able to inherit the class es like this.
Code:
C#
using theblueinian.uploadaccess;
the classes within that namespace will then be avilable from within your code?

As an aside are you working in VB or C# or a mixture of the two as your Page declaration references a C# codebehind file but your namespace and classes are decalred in VB...

Hope this helps

Rob

------------------------------------

On with the dance! let joy be unconfined;
No sleep till morn, when Youth and Pleasure meet
To chase the glowing hours with flying feet.
-Byron

------------------------------------
 
i working in vb...the c# stuff is a typo.

my codebehinds are inheriting the webform, via the class Generic Page, which inherits the webform itself.

perhaps this will help clarify the problem:

if i try to import any of these classes i created, i get a compiler error that the says the namespace or type can't be found. ie. the statment
Code:
Imports theblueindian.UploadAccess.DataConn

procduces an error even in the project which i created that class in.

i think i might have some sort of setup error in visual studo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top