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

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -