Server controls and DOM events?
-
Does anybody know if it's possible to use DOM events with the standard UI.Controls. A control will not accept onmouseover="JavaFunction()" for instance. Does anyone know of a way to do this without creating a new server side control?
-
Does anybody know if it's possible to use DOM events with the standard UI.Controls. A control will not accept onmouseover="JavaFunction()" for instance. Does anyone know of a way to do this without creating a new server side control?
Yes, you can do this. Remember that the DOM events are client-side so you must set attributes on the controls. You can only do this in code AFAIK...
TextBox test = new TextBox() test.Attributes["onmouseover"] = "JavaFunction();";
This should do the trick. HTH, :) Simon.
-
Yes, you can do this. Remember that the DOM events are client-side so you must set attributes on the controls. You can only do this in code AFAIK...
TextBox test = new TextBox() test.Attributes["onmouseover"] = "JavaFunction();";
This should do the trick. HTH, :) Simon.
Thanks Simon ;)