Step1:- Validations on jquery
$(document).ready(function () {
$("#btnSave").click(function () {
var firstName = $("#txtFirstName").val();
var lastName = $("#txtLastName").val();
var Email = $("#txtEmail").val();
var password = $("#txtPassword").val();
var confirmPassword = $("#txtConfirmPassword").val();
var Gender = $("#ddlGender option:selected").text();
if (firstName == "" && lastName == "" && Email == "" && password == "" && confirmPassword == "" && Gender == "Select Gender")
{
$("#txtFirstName").css("border-color", "red");
$("#txtLastName").css("border-color", "red");
$("#txtEmail").css("border-color", "red");
$("#txtPassword").css("border-color", "red");
$("#txtConfirmPassword").css("border-color", "red");
$("#ddlGender").css("border-color", "red");
return false;
}
});
});
$(document).ready(function () {
$("#btnSave").click(function () {
var firstName = $("#txtFirstName").val();
var lastName = $("#txtLastName").val();
var Email = $("#txtEmail").val();
var password = $("#txtPassword").val();
var confirmPassword = $("#txtConfirmPassword").val();
var Gender = $("#ddlGender option:selected").text();
if (firstName == "" && lastName == "" && Email == "" && password == "" && confirmPassword == "" && Gender == "Select Gender")
{
$("#txtFirstName").css("border-color", "red");
$("#txtLastName").css("border-color", "red");
$("#txtEmail").css("border-color", "red");
$("#txtPassword").css("border-color", "red");
$("#txtConfirmPassword").css("border-color", "red");
$("#ddlGender").css("border-color", "red");
return false;
}
});
});