c# - OnDataBound not fired for asp:DropDownList with static asp:ListItems -
c# - OnDataBound not fired for asp:DropDownList with static asp:ListItems -
i have <asp:dropdownlist>
witch gets filled static list items.
<asp:dropdownlist ... ondatabound="handlermethod"> <asp:listitem value="..." text="..." /> <asp:listitem value="..." text="..." /> <asp:listitem value="..." text="..." /> </asp:dropdownlist>
the problem ondatabound
event not triggered when list filled. need trigger fill other info list items in dropdown.
the documentation says:
this method notifies server command info binding logic associated command has completed.
my eyes on "logic" word makes me thing missed point on when event triggered
but if case, how can event triggered or other event can utilize know when list has finished beeing filled?
normally means have deleted autoeventwireup="true"
or set false, , that's why it's not wiring event.
it can mean there wrong in javascript not allow anymore code run. open inspector (chrome, safari or firebug in firefox - not rely on ie developer tools) , see if have javascript errors can cause page stop.
it can mean handlermethod
not correctly set up, best way delete html part ondatabound="handlermethod"
, code behind of method, go design view
, open properties window in events , double click ondatabound
, add together event correctly. set break point there , run in debug debug="true"
in web.config
file.
c# asp.net events drop-down-menu listitem
Comments
Post a Comment