G
Guest
I have block of code adding values to dropdown list under
if (!Page.IsPostBack)
{
adding items
}
else
{
refreshing data
}
return
even I am checking !Page.IsPostBack, once its reaches to return, again it is
going to top of Page_Load event and executing true part of If block. So the
data is adding twice to the dropdown list.
One thing I do not understand is once the page is loaded, second time why
Page.IsPostBack is showing 'false'.
any help please, thanks in advance
if (!Page.IsPostBack)
{
adding items
}
else
{
refreshing data
}
return
even I am checking !Page.IsPostBack, once its reaches to return, again it is
going to top of Page_Load event and executing true part of If block. So the
data is adding twice to the dropdown list.
One thing I do not understand is once the page is loaded, second time why
Page.IsPostBack is showing 'false'.
any help please, thanks in advance