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

Discussion in 'ASP .Net' started by Radu, Jan 18, 2007.

  1. Radu

    Radu Guest

    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">
    <Columns>
    <MyTag:MyCustomBoundColumn DataField="Column1" etc
    ></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
    Radu, Jan 18, 2007
    #1
    1. Advertising

  2. Radu

    Radu Guest

    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.....



    Radu wrote:
    > 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">
    > <Columns>
    > <MyTag:MyCustomBoundColumn DataField="Column1" etc
    > ></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
    Radu, Jan 18, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raymond Arthur St. Marie II of III

    very Very VERY dumb Question About The new Set( ) 's

    Raymond Arthur St. Marie II of III, Jul 23, 2003, in forum: Python
    Replies:
    4
    Views:
    454
    Raymond Hettinger
    Jul 27, 2003
  2. shanx__=|;-

    very very very long integer

    shanx__=|;-, Oct 16, 2004, in forum: C Programming
    Replies:
    19
    Views:
    1,594
    Merrill & Michele
    Oct 19, 2004
  3. Abhishek Jha

    very very very long integer

    Abhishek Jha, Oct 16, 2004, in forum: C Programming
    Replies:
    4
    Views:
    410
    jacob navia
    Oct 17, 2004
  4. Peter

    Very very very basic question

    Peter, Feb 8, 2005, in forum: C Programming
    Replies:
    14
    Views:
    504
    Dave Thompson
    Feb 14, 2005
  5. olivier.melcher

    Help running a very very very simple code

    olivier.melcher, May 12, 2008, in forum: Java
    Replies:
    8
    Views:
    2,249
Loading...

Share This Page