View Single Post
  #2 (permalink)  
Old June 2nd, 2008, 01:40 PM
dparsons dparsons is offline
Wrox Author
Points: 12,827, Level: 49
Points: 12,827, Level: 49 Points: 12,827, Level: 49 Points: 12,827, Level: 49
Activity: 15%
Activity: 15% Activity: 15% Activity: 15%
 
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
Send a message via AIM to dparsons
Default

You shouldn't use these events together. After all, when a use "double clicks" on your element it is also going to raise the onclick event. I would suggest using one or the other.

As far as adding the events to the textbox you could add the events directly in the IDE, although this is going to raise warnings that are similar to <event> is not valid for element <element> so you could add it via:

TextBox1.Attributes.Add("onClick", "javascriptMethod()");
TextBox1.Attributes.Add("ondblClick", "javascriptMethod()");

hth.
-Doug



================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
Reply With Quote