Hi everyone.
I would like to know if is it possible to call a Jquery function programatically in C# e.g. If the user enetered correct login credentials call a function that hides the login form else don't call the function that hides the login form so that the user can entrered their credentials again.
Loading
Suraj SahooPosted Feb 8, 2015, 1:18 PM
You can acomplish this, by making an ajax call in the js file. Something like below:
$.ajax({
url:"/Login/ConfirmLogin",
data: userModel,
success: function(response){ // response in terms of boolean true/false
if(response=="True"){
//hide the Login form
}
else{
//alert("Not valid Login credentials");
}
});
I hope this gives you an idea.
Thanks
Accept if this helps anyway.