Dropdown viewstate probelm

M

Mohamed Zaki

Dears,

I've a problem in the viewstate regarding the dropdown list, i'm populating
it on the page load if it's not a postback and the enable viewstate is
enabled on the control and the page, and when a control submits the dropdown
list is rendered empty !, i've tested the code on another server and it's
working fine so i checked the web.config and found the viewstate="true" in
the page tag.

=================================
if (!IsPostBack)

{

ht.Add("medo","medo");

ht.Add("teto","teto");


//this.DropDownList1.DataSource=ht;

//this.DropDownList1.DataBind();


this.DropDownList1.Items.Add("medo");

this.DropDownList1.Items.Add("dedo");

}

=================================================

Please advise.

Regards,
Mohamed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top