Asp text control onchanged event

hi, experts.

would it be possible that i have asp text control and hook on onchanged event to client script at html page ? i've tried that...but couldn't get it work. cause i dont it to postback to server and can do online calculation on client browser. any solution other than using pure html text control ?

thank you.

Who is Participating?
ooops, a typo, should be:

myTextBox.Attributes.Add( "onchange", "javascript:alert('It works!');" );

(and not 'onchanged' because it's not correct name of that event)
you can use javascript..for the same..

i'm agree with zulu - if you choose such a scenario it is much easier to do it with javacript
the other solution is to make everything on the server, but then if your form contains a lot of controls it will be slow if you add autopostback to every control. so if you decide to make calculation on the server make them after you submit all the data

you can use Attributes collection of text control to add onchanged handler:

myTextBox.Attributes.Add( "onhange", "javascript:alert('It works!');" );
Explorer060599Author Commented:
thank you very much chaniewskim, l've been seraching this solution for some times.
supprising that it's easiear what i though.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.