I have a DropDownList, a Button and a ModalPopupExtender.
When the user clicks the button, depending on the value they've selected, I'd like to either let the button cause a normal postback, or trigger a ModalPopupExtender (and cancel the Buttons postback).
I've achieved this by using ModalPopupExtender.Show() and ModalPopupExtender.Enabled on the server-side but wondered if anyone could think of a better way of doing this, using JavaScript, to avoid a postback.