9
การโทร Ajax อย่างง่ายไปยังคอนโทรลเลอร์ใน asp.net mvc
ฉันกำลังพยายามเริ่มต้นด้วยการโทร ASP.NET MVC Ajax ตัวควบคุม: public class AjaxTestController : Controller { // // GET: /AjaxTest/ public ActionResult Index() { return View(); } public ActionResult FirstAjax() { return Json("chamara", JsonRequestBehavior.AllowGet); } } ดู: <head runat="server"> <title>FirstAjax</title> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { var serviceURL = '/AjaxTest/FirstAjax'; $.ajax({ type: …