Tim,
You might want to set the combobox to not use viewstate to store it's
state, and rather, just populate the combobox every time you load the page.
You can cache the data for the list to make the operation faster as well.
Then, you can add items to the page based on the conditions that you
specify, and not the page state (which I don't think is a good model, to
base it on the page state, that is).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:E7**********************************@microsof t.com...
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