Home All Groups Group Topic Archive Search About

Type ... is not defined, WHY??

Author
13 Oct 2006 5:51 AM
Søren M. Olesen
Hi

In my website I have a module, placed under App_Code with a number of
utility functions. For one of these functions I'm trying to pass a
usercontrol as an argument, however I keep getting 'Type myControl is not
defined' ... how come??, and how do I solve it??


Under App_Code:

Namespace myCompany.myProduct
    Public Module myUtilities
        Public Function myFunc(ByVal ctrl As
myCompany.myProduct.UserControls.myControl) As Boolean
            ctrl.value="test"
        End Function
    End Module
End Namespace


Under: Customer/UserControls

Namespace myCompany.myProduct.UserControls
    Partial Class myControl
        Inherits System.Web.UI.UserControl
        Public Property value() As Object
            Get
            End Get
            Set(ByVal value As Object)
            End Set
        End Property
    End Class
End Namespace

Author
13 Oct 2006 11:01 AM
rowe_newsgroups
Here's a similar thread that may help.

http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/4dd1fbb80b192c5a/c48b698e5acd4926?lnk=gst&q=user+control+type+not+defined&rnum=3#c48b698e5acd4926

Thanks,

Seth Rowe


Søren M. Olesen wrote:
Show quoteHide quote
> Hi
>
> In my website I have a module, placed under App_Code with a number of
> utility functions. For one of these functions I'm trying to pass a
> usercontrol as an argument, however I keep getting 'Type myControl is not
> defined' ... how come??, and how do I solve it??
>
>
> Under App_Code:
>
> Namespace myCompany.myProduct
>     Public Module myUtilities
>         Public Function myFunc(ByVal ctrl As
> myCompany.myProduct.UserControls.myControl) As Boolean
>             ctrl.value="test"
>         End Function
>     End Module
> End Namespace
>
>
> Under: Customer/UserControls
>
> Namespace myCompany.myProduct.UserControls
>     Partial Class myControl
>         Inherits System.Web.UI.UserControl
>         Public Property value() As Object
>             Get
>             End Get
>             Set(ByVal value As Object)
>             End Set
>         End Property
>     End Class
> End Namespace