Solved

Asp text control onchanged event

Posted on 2004-04-19
5
421 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Duplicate a row 2 46
Idea or tool for building a form application using ASP.net MVC 2 38
Why don't I see this table in EDMX file? 2 23
Achieve json result 2 65
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now