M
Mark Vejvoda
I am using c# with a dropdownlist control in and aspx page with dll in
codebehind. I populate the control by creating a dataset then binding the
dataset to the control ONLY when:
if(Page.IsPostBack == false)
{
}
But when I load the control and set the selected index to a value based on a
flag in a cookie in the same page_load event, say username is set to bob,
when I change the selected item to another name all works ok. But if I
change back to what the page loaded with the original time (ie bob) the
changed event doesn't fire only the page_load does. To correct this defect I
stored a boolean flag to tell me if the event was fired... if not in the
pre-render of the page I explicity call the changed event on the dropdown
and all works ok.
Hope this helps anyone else out there with the same prob.
codebehind. I populate the control by creating a dataset then binding the
dataset to the control ONLY when:
if(Page.IsPostBack == false)
{
}
But when I load the control and set the selected index to a value based on a
flag in a cookie in the same page_load event, say username is set to bob,
when I change the selected item to another name all works ok. But if I
change back to what the page loaded with the original time (ie bob) the
changed event doesn't fire only the page_load does. To correct this defect I
stored a boolean flag to tell me if the event was fired... if not in the
pre-render of the page I explicity call the changed event on the dropdown
and all works ok.
Hope this helps anyone else out there with the same prob.