Comment accéder au contrôle (liste déroulante) de la page en cours à partir de UserControl?Comment accéder au contrôle dans Page à partir du UserControl?
Dans le UserControl:
String test = ((DropDownList)this.Parent.FindControl("drpdwnlstMainRegion")).SelectedValue;
ou
String test = ((DropDownList)this.Page.FindControl("drpdwnlstMainRegion")).SelectedValue;
Il retourne null sur ((DropDownList) this.Parent.FindControl ("drpdwnlstMainRegion")) pour une raison quelconque?!?!
BTW ... J'utilise ASP.NET C# 3.5.
Merci