On the page, there is a customized ASP Login control box that contains Username and Password textboxes.
I am trying to locate the Username and Password controls using a JavaScript function.
var Username= document.getElementById("<%=UserName.ClientID%>");
Unfortunately, this code does not compile and results in a compile time error:
UserName not found in this context.
If I use the client side id directly like this:
var username = document.getElementById("login_LoginUser_UserName");
It works fine, but I aim to dynamically find the client id instead of hardcoding it here.