Link to home
Start Free TrialLog in
Avatar of tentavarious
tentavarious

asked on

using javascript to handle asp.net textchanged event?

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>
ASKER CERTIFIED SOLUTION
Avatar of Justin_Case_77
Justin_Case_77

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial