we are developing a web application using MVC3 and Jquery. we have a situation where we need to check the request is authenticated (@Request.IsAuthenticated) using Jquery. what is the best way to do that using Jquery?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
make a helper action on one of the controllers or maybe on a Base controller and return a
ContentResult(with a value oftrueorfalse). Use jquery’s ajax() function to perform asynchronous GET request to the server side controller action.If you can afford to have the Javascript code inside the view then you can simply do