Skip to content
Loading
 
+1
  • Salman Beg
    +1
    Hi. As per your latest comment, Hello alert will come only when you change any value in textbox because Hello alert is present in the Text change event. Thanks
    +1
  • Jignesh Kumar
    +1
    Hi cally,
     
    Please add AutoPostBack property true and try to put some data in textbox then this alert will pop up because its written on textchange event of textbox.
     
    "TextBox1" runat="server" AutoPostBack="true"
    OnTextChanged="TextBox1_TextChanged" >Hello
    +1
  • Jignesh Kumar
    0
    Hi Cally,
     
    Javascript is Casesensitive please change event name like below
     
    1. TextBox1.Attributes.Add("onkeydown", "alert('Hello')");    
     
    0