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.
Programatically calling a Jquery function.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Suraj SahooRank #382 · 6.6K reputationPosted Feb 8, 2015, 8:18 AM EST
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.