Re: Class of UserControl not found in Page

>
> Where is the file conained the class 'Contols_Footer' located?
>
Alex,
All files are contained in one web. MasterPage and aspx-Page are in
the main folder.

Controls_Footer is located in subfolder called: Controls.

All files use the same namespace: B2BShop.Web.
The aspx and ascx files have a reference which uses the namespace in
the Inherit - Attribute.
(Inherits="B2BShop.Web.Controls_ProductDetail")
Mathias Fritsch [ So, 30 MÃĪrz 2008 18:08 ] [ ID #1932568 ]

Re: Class of UserControl not found in Page

re:
!> Controls_Footer is located in subfolder called: Controls.

re:
!> The aspx and ascx files have a reference which uses the namespace in
!> the Inherit - Attribute. (Inherits="B2BShop.Web.Controls_ProductDetail")

Another way to do this is by placing the .ascx file in the App_Code directory.

See:
http://odetocode.com/Blogs/scott/archive/2005/10/01/2293.asp x

....you don't even need a reference, although the ascx source must use inline code.
That isn't practical for you if you use codebehind in the ascx ( some.ascx.cs, for example ).

However, Bruce is right.

If you want to do it the way you're currently doing it, you must include a reference :

<% [at] Reference Control="YourUserControl.ascx" %>

The Inherits statement doesn't provide a reference.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Mathias Fritsch" <mathiasfritsch [at] gmx.de> wrote in message
news:95e6401d-8f40-4ec7-8a8f-17b71381985b [at] p25g2000hsf.google groups.com...
>
>>
>> Where is the file conained the class 'Contols_Footer' located?
>>
> Alex,
> All files are contained in one web. MasterPage and aspx-Page are in
> the main folder.
>
> Controls_Footer is located in subfolder called: Controls.
>
> All files use the same namespace: B2BShop.Web.
> The aspx and ascx files have a reference which uses the namespace in
> the Inherit - Attribute.
> (Inherits="B2BShop.Web.Controls_ProductDetail")
>
>
>
nomailreplies [ So, 30 MÃĪrz 2008 19:30 ] [ ID #1932570 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Re: Class of UserControl not found in Page

Vorheriges Thema: Working with controls inside a repeater
Nächstes Thema: Re: Error Message could not find a non-generic method