Should be very simple.... Where is the error ?

R

Radu

Hi. I have a class "MyCustomBoundColumn.vb" which looks like this

____________________________________________________________________
Imports System
Imports System.Web.UI.WebControls

Namespace Alex
Public Class MyCustomBoundColumn
Inherits BoundColumn
.............................
End Class
End Namespace
____________________________________________________________________

and another, MyCustomDataGrid.vb, like this:

____________________________________________________________________
Imports System
Imports System.Web.UI.WebControls

Namespace Alex
Public Class MyCustomDataGrid
Inherits DataGrid
.............................
End Class
End Namespace
____________________________________________________________________

I need to use MyCustomDataGrid in an aspx page, therefore:
<%@ Register Tagprefix = "MyTag" Namespace="Alex" Assembly =
"MyCustomDataGrid" %>

and in the form

<MyTag:MyCustomDataGrid runat="server" AutoGenerateColumns="False">
</MyTag:MyCustomBoundColumn>
<MyTag:MyCustomBoundColumn DataField="Column2" etc
</MyTag:MyCustomBoundColumn>
</Columns>
</MyTag:MyCustomDataGrid>

However, I get "MyCustomDataGrid is not a known element", and then a
cascade of other errors. I guess I'm missing something elementary....
but what ?

Thanks.
Alex
 
R

Radu

PS. The projects name is TestCustomDataGrid... Even if I try with
<%@ Register Tagprefix = "MyTag" Namespace="Alex" Assembly =
"TestCustomDataGrid" %>
it does not work.

Should I create a DLL first ? (Using vbc ?) Can't my classes be in the
same project ?
If so, I guess I should create MyCustomBoundColumn.dll first, and then,
somehow, reference to it in
MyCustomDataGrid and create MyCustomDataGrid.dll, and then move
MyCustomDataGrid.dll in the BIN folder of the project
TestCustomDataGrid, and then try again... I tried that, but I can't
compile
MyCustomDataGrid because it says it doesn't know who
MyCustomBoundColumn is.....
 

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

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top