i am binding a ddl on page_load event, when the page is refreshed, the entries are duplicate.
ex--
India
India
India
Abc
Abc
Abc... and so on..
Duplicate entry in DDL
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Pankaj PandeyRank #642 · 3.7K reputationPosted Jun 20, 2013, 3:50 AM EDT
{
//BInd here dll.
}
}
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 20, 2013, 2:35 AM EDT
Ex:
ddlCountry.Items.Clear();;
after that write the dropdown bind code
put your bind code within
if(!IsPostBack)
{
}
if any problem rply.
if it helped you mark it as answered
Sunny SharmaRank #223 · 11.1K reputationPosted Jun 20, 2013, 2:38 AM EDT
Put a check if it's a postback on page load. Wrap your Page_Load codes inside an if block like this:
----------------------------------------
if(!IsPostBack)
{
//fill the ddl
// other codes go here if required
}
-----------------------------------------
Happy Coding :)
mark this as answer if it helped.
Cheers!
Ravi ShekharRank #673 · 3.6K reputationPosted Jun 20, 2013, 2:56 AM EDT
Use IsPostBack on page_load bcoz it fires only once when page is loaded first time.
page_load
{
if(!IsPostBack)
{
}
}