Solved

using javascript to handle asp.net textchanged event?

Posted on 2006-06-30
1
2,916 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …

828 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