Question : How do I invoke a Java script for onkeypress for a dynamically added control?

How do I invoke a Java script for onkeypress for a dynamically added control?  Normally in the ASP code I would have:

ID="txtQuantity" onkeypress="return IsNumberKey(event)" runat="server"

Answer : How do I invoke a Java script for onkeypress for a dynamically added control?

txtNumericData.Attributes.Add("onkeypress","return IsNumberKey(event)")
Random Solutions  
 
programming4us programming4us