c# - Add a method to a custom control that I can access from the client with javascript -


i have asp.net custom control extends dropdownlist. want add method can call javascript client clears user selection , resets list default. far have been unable right. code below returns , exception, 0x800a01b6 - javascript runtime error: object doesn't support property or method 'clearselection'.

in asp.net control have:

public void clearselection() {     //... code reset list } 

and in aspx page have javascript attempts invoke method.

var control = $("body").find('<%=uxbillto.clientid %>'); if (control != null) {     control.clearselection(); } 


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -