Version

ValueChanging Property (DropDownClientEvents)

Syntax
'Declaration
 
Public Property ValueChanging As String
public string ValueChanging {get; set;}
Example
WebDropDown1.ClientEvents.ValueChanging = "WebDropDown_ValueChanging"
WebDropDown1.ClientEvents.ValueChanging = "WebDropDown_ValueChanging";
// The client event 'ValueChanging' takes two parameters sender and e
// sender  is the object which is raising the event
// e is the DropDownEditEventArgs
  function WebDropDown_ValueChanging(sender, e) {
      //Gets the new value in the  value display
      var newValue = e.getNewValue();

      //Gets the old value in the value display
      var oldValue = e.getOldValue();

      if (!confirm("Are you sure you want to change the curent value from '"+ oldValue+"' to"+newValue+"?"))
      //Cancels the ValueChanging client event 
          e.set_cancel(true);
  }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also