I have a jQuery modal system that I have built and would like to trigger the modal to popup if the username or password entered by a user is invalid. I need to do these checks from the C# codebehind in ASP, and then if there is an invalid username or password trigger my JavaScript function: showModal("errorDiv").
Is this possible?
I don't want to bind the JavaScript to a button click but rather on the condition of the block of code on a button click.
So basically
btnSubmit_OnClick(sender, e) {
if (Username.Exists())
// Continue on
else
call showModal("errorDiv");
}
Any help?