we know,The dropdownlist is a server control.Sometimes, some friends, for the convenience of binding the dropdownlist drop-down box options,But want to implement the client's drop-down event in the dropdownlist,How do you achieve that?
If i want to add client-side drop-down events to the dropdownlist server control,We can force it to add an onchange event, although there is no hint for this method in the control.Adding this event has not yet achieved its purpose,Also set the autopostback property to false to prevent it from posting back events.
Here is the code for everyone:
in conclusion,That is,To add a client drop-down event to the dropdownlist drop-down box,Must do two steps,One is to add a mandatory onchange event, and the other is to set the autopostback property to falseIt's that simple!
- DropDownList drop-down box selects changes to trigger events and prevent global refresh (recommended)
- 4 ways to bind data to DropDownList drop-down list control in ASPNET
- C # summary of methods to add new data using DropDownList binding
- aspnet DropDownList achieves secondary linkage effect
- DropDownList implementation can be input selectable (two versions are optional)
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- xcode - pod install [!] no `podfile 'found in the project directory
- dart - flutter: the instance member'stars' can't be accessed in an initializer error