62,072
社区成员
发帖
与我相关
我的任务
分享
$.ajax({
type: "get",
url: "Index/Get",
dataType: "json",
success: function (d) {
alert(d);
}
});
public class IndexController : Controller
{
//
// GET: /Index/
public ActionResult Index()
{
return View();
}
public async Task<ActionResult> Get()
{
var q = await Task.Run(() => { return "123"; }); ;
return Json(q, JsonRequestBehavior.AllowGet);
}
}