I am creating an input box and trying to add an event keydown to that input. If I create the input staticly, I can find it with jquery. However, if I create it in code behind, I cannot find it by jquery.
here is the c# code where I create my input dynamically
result0 += "<div style='float:left;width:130px'>Telephone: </div><div style='float:left;width:200px'><input id='txt_basic_telno" + i + "' class='blue_input' type='text' value='" + dr["MobilePhone"].ToString() + "' style='width:250px' maxlength='11' /></div><div style='clear:both'></div>";
and here is my jquery code which is supposed to trigger when user press a key during the focus is on the input box
$("#txt_basic_telno").keydown(function (event) {
alert('test');
});
How can I fix this?