I need to trigger a server-side ASP.NET button click event using JavaScript. After inspecting the page source, I found that the button
's client-side onclick
function is:
WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$LoginInfo1$btnliOK", "", true, "", "", false, false));
However, I am looking for a way to replace ctl00$LoginInfo1$btnliOK
with something like <%= btnliOK.ClientName %>
. Is there a solution to achieve this?