Dear,
Hi I am using MVC4 Razor. I have requirement to call javascript function from controller.
Please do needfull.
Thanks In Advances
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek KumarRank #510 · 4.8K reputationPosted Apr 8, 2015, 3:32 AM EDT
You an try using the below sntax.
$.ajax({ type: "POST", url: "/Controller/Action", // the URL of the controller action method data: null, // optional data success: function(result) { // do something with result }, error : function(req, status, error) { // do something with error } }); Share the code plzz if you want more clear answer. Abhishek