I have a textbox and a button. I need to imitate the hover property for a textbox (if textbox value is empty) on button click.
I've tried the following, but it doesn't work:
HTML
<input id="surname" type="text" runat="server" />
<button id="Button1" runat="server" type="submit" onserverclick="RegistrationBtn_Click">OK</button>
Script
function MakeHover() {
$("#surname").mouseenter();
}
C#
if (surname.Value == "")
ScriptManager.RegisterStartupScript(this, this.GetType(), "Hover", "MakeHover();", true);