In my WebApplication I have some code like this.
$('.form-content').append('<ul>' +
'<li runat="server" OnClick="SelectUser" value="1">User 1</li>' +
'<li runat="server" OnClick="SelectUser" value="2">User 2</li>' +
'<li runat="server" OnClick="SelectUser" value="3">User 3</li>' +
'</ul>');
But, when I select the list item, the Event doesn't trigger. Is there any way to bind ASP.NET event to html control which is dynamically generated by JQuery/Javascript ?
I tried using WebMethod. But, It cannot update the ASP.Net controls since the method is static.
WebMethodand call thatWebMethodfrom$.ajaxand obviously that$.ajaxcan be called for any HTML control.. :)SelectUseris a method on serverside??