i add the data from database to my dropdownlist,when everytime i refresh the page the same items added repetedly
like mango
graphes
orange
mango
graphes
orange
if i set property append data bound-false some things are not work properly
how could i avoid that issue?
Dropdownlist
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Felipe RamosRank #1,409 · 1.2K reputationPosted May 25, 2011, 9:04 AM EDT
In your page load you will need to add
if (!Page.IsPostBack)
{
// Add it here
}
Suthish NairRank #92 · 22.8K reputationPosted May 25, 2011, 9:13 AM EDT
On Page_Load
Posted May 25, 2011, 9:52 AM EDT
So in the Page_Load event
protected void page_Load(object sender,EventArgs e)
{
if (!IsPostBack)
{
//Load your dataset or datatable here.
//Bind the DropDownList here.
}
}
Hope this helps you.