Canceling AutoPostBack for Asp.Net DropDownList

January 25, 2010
Tags: ,

In my most recent project, I decided to prompt the user before doing a post back when a DropDownList changed. In order to do so, you need to add an “onchange” event to your DropDownList. It should look something like: onclick=”if(!SomeFunction(this)) return false;” Some Notes: “SomeFunction” is a javascript function that returns true or false [...]

0