user3867603 user3867603 - 1 year ago 75
ASP.NET (C#) Question

Need to add keydown event for Text box and need to trigger a codebehind function using the keydown event

The page load event:

txtName.Attributes.Add("onkeyup", "return doDataListBind()");`


function doDataListBind()

Created a button and tried to trigger on-click event using JavaScript.

Answer Source

In jQuery:

$( "#Button2" ).trigger( "click" );
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download