That is because your
DropDownList
binds with every Page Load. You need to check for
PostBack
. If Page is Posting Back, then no need to bind.
So, when you select any option from
DropDownList
, it goes to
Page Load
and binds it again. That's the issue.
Now, update the code like below...
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
dfi();
}
}