I want to show a confirmation dialog when a specific value is selected in an asp:DropDownList. If the confirmation dialog returns false (cancel) then I want to prevent the AutoPostBack.
<asp:DropDownList id="theDropDownID" onchange="foo()"></asp:DropDownList>
However, it ignores the returned value from foo() and actually does the postback.
The generated code of the onchange event is:
foo(); setTimeout("__doPostBack('theDropDownID','')", 0);
so basically controlling the setTimeout that the .net adds, will do the job.
Any idea how?
Thanks!