Not necessarily (FindControl search in the current naming container). As you
didn't mentioned anything in your code, it search in the page container and
it's likely your control is declared actually in a inner container (else you
coud directly use the variable name of course).

Try MyContainer.FindControl instead...

--
Patrice


"kpg" <no@spam.com> a écrit dans le message de news:
Xns996F7C4487EA3ipostthereforeiam@207.46.248.16...
> InASP.NET 2.0 I have a checkbox named CB1
>
> <asp:CheckBox ID="CB1" runat="server" />
>
> In the Page_Load event:
>
> dim cb as checkbox
> cb = ctype(findcontrol("CB1"), checkbox)
>
> but cb = nothing
>
> Am I going crazy? This should work, right?
>
> tia
> kpg