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/en...butestopic.asp
i.e. to assign some javascript function that will handle the onselectstart
event:
[C#]
textbox1.Attributes["onselectstart"] = "javascript
:DoSomething();";
[VB.NET]
textbox1.Attributes("onselectstart") = "javascript
:DoSomething();"
Hope this helps
Martin
"Strange Cat" <st*****@cat.com> wrote in message
news:Ou********************@news4.tin.it...
Hi everyone
Is it possible to select the contents in an aspnet textbox? (Like the old
textbox selectstart and so on properties)
Thanx in advance