Hi, Strange Cat,
The TextBox is rendered to the client (the html that is sent to the browser)
as <input type="text"...>, <input type="password"...> or
<textarea></textarea> HTML element. So, you can set whatever client-side
properties, events, styles, etc. apply to these elements to your TextBox.
To access from the server-side (the code-behind) some specific event or
property of the HTML element that do not have corresponding properties of
the System.Web.UI.WebControls.TextBox class you should use the Attributes
property of this class.
http://msdn.microsoft.com/library/e...webcontrolswebcontrolclassattributestopic.asp
i.e. to assign some javascript function that will handle the onselectstart
event:
[C#]
textbox1.Attributes["onselectstart"] = "javascript
oSomething();";
[VB.NET]
textbox1.Attributes("onselectstart") = "javascript
oSomething();"
Hope this helps
Martin