Tuesday, July 2, 2013

JavaScript - validating a text box using javascript in asp.net with master page

function CheckEmptyText() {
            if (document.getElementById("<%=txtUserid.ClientID %>").value == "") {
                alert("Please Key-In User Id.");
                document.getElementById("<%=txtUserid.ClientID %>").focus();
                return false;
            }
            else {
                return true;
            }
        }

No comments:

Post a Comment