Because because because because the formview is a control. You cannot
reference nested templated controls from the page that hosts the formview.
If you need to access your control within the formview, try something like
this :
DropDownListBox ddl = (DropDownListBox)FormView1.FindControl("ddl");
FindControl method will look into the nested controls (not recursively, be
carefull) of the formview and return the control it founds or null if not
found.
Steve
"Mr. SweatyFinger" <sw@sw1finger.coma écrit dans le message de news:
O%******************@TK2MSFTNGP02.phx.gbl...
>I have a usercontrol.
In the usercontrol i have a formview.
in the formview I have a dropdownlist with a sqldatasource
why why why why can't i referenct the sqldatasource from the codebehind?"
what gives??