I tried Page_Init and Page_PreInit to no result.
I tried SelectedIndexChanged, but it did not fire.
The only thing that changed something was to repopulate the list in
Page_Lod, by using myDDL.Items.Add. And then it only worked for the next
PosyBack.
Later PostBack no longer change the value.
Thanks.
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orga écrit dans le
message de news: uh****************@TK2MSFTNGP06.phx.gbl...
Move this line
myDDL = new DropDownList
into Page_PreInit event.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Francois" <francois@corebridgecomwrote in message
news:uA****************@TK2MSFTNGP04.phx.gbl...
>Hello,
ASP NET 2.0 visual studio 2005.
I am tryng to create a dynamic dropdownlist in the Page_Load event.
myDDL = new DropDownList
I populate it in the IsPostBack branch of Page_Load.
myDDL.DataSource = ArrayList ...
myDDL.DataBind();
When the page is called back after a click, the dropdownlist comes back
empty,
I have myDDL.SelectedValue = "" ;
I have no problem with other textBox.
Of course, EnableViewState = true.
What should I check for ?
Thanks.
François.