Solved

Asp text control onchanged event

Posted on 2004-04-19
5
424 Views
Last Modified: 2012-05-11
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.

0
Comment
Question by:Explorer060599
5 Comments
 
LVL 6

Expert Comment

by:zulu_11
ID: 10859086
you can use javascript..for the same..

Zulu_11
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 10859182
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

B..M
0
 
LVL 5

Expert Comment

by:chaniewskim
ID: 10859217
you can use Attributes collection of text control to add onchanged handler:

myTextBox.Attributes.Add( "onhange", "javascript:alert('It works!');" );
0
 
LVL 5

Accepted Solution

by:
chaniewskim earned 125 total points
ID: 10859235
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)
0
 

Author Comment

by:Explorer060599
ID: 10860156
thank you very much chaniewskim, l've been seraching this solution for some times.
supprising that it's easiear what i though.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question