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( "TextChang ed", "textboxchanged();")
End Sub
Html
<script language="javascript">
function textboxchanged(){
document.Form1.lbllabel.va lue = document.Form1.txtpackage. value
}
</script>
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(
End Sub
Html
<script language="javascript">
function textboxchanged(){
document.Form1.lbllabel.va
}
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.