Solved

using javascript to handle asp.net textchanged event?

Posted on 2006-06-30
1
2,873 Views
Last Modified: 2008-01-09
Hello experts I am trying to use javascript to handled the text changed event of one of my asp.net textboxes and set the value of a asp.net label equal to the textbox.  I am using asp.net 1.1 how can i do this with javascript?  I could do all of this server side, but then I get the post backs, which I dont want.  Below i tried setting a attribute in the page load event

code behind
 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        txtpackage.Attributes.Add("TextChanged", "textboxchanged();")
    End Sub

Html
      <script language="javascript">
            function textboxchanged(){
            document.Form1.lbllabel.value = document.Form1.txtpackage.value
            }
            </script>
0
Comment
Question by:tentavarious
1 Comment
 
LVL 3

Accepted Solution

by:
Justin_Case_77 earned 125 total points
ID: 17022813
txtpackage.Attributes.Add("onChange", "textboxchanged();")
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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

12 Experts available now in Live!

Get 1:1 Help Now