Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Should be very simple.... Where is the error ?

Reply
Thread Tools

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

 
 
Radu
Guest
Posts: n/a
 
      01-18-2007
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

 
Reply With Quote
 
 
 
 
Radu
Guest
Posts: n/a
 
      01-18-2007
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very very very basic question Peter C Programming 14 02-14-2005 09:46 AM
very very very long integer shanx__=|;- C Programming 19 10-19-2004 03:55 PM
very very very long integer Abhishek Jha C Programming 4 10-17-2004 08:19 AM
Quick Book file access very very very slow Thomas Reed Computer Support 7 04-09-2004 08:09 PM
very Very VERY dumb Question About The new Set( ) 's Raymond Arthur St. Marie II of III Python 4 07-27-2003 12:09 AM



Advertisments