Solved

Asp text control onchanged event

Posted on 2004-04-19
5
425 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 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