I want to use jQuery get method with a partial view. What is the best way to do it? I read about jQuery get and the simplest way to me is this code:
$.get(@Url.Action('Controller', 'Action'), function () { });
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.
You are just missing quotes around the url and have messed up the
Url.Actionhelper syntax. Here’s the correct way:Notice the single quotes around the url passed to the $.get method and the signature of the Url.Action helper.