ASP.Net MVC JQuery的AJAX调用不返回任何东西东西、Net、ASP、MVC

由网友(川上野子)分享简介:是否有可能通过AJAX使从视图调用一个控制器(在我的情况下,使用JQuery),不返回任何东西?我只是设置会话一些变量并没有输出显示。Is it possible to make a call from a view to a controller via ajax (in my case using JQuery)...

是否有可能通过AJAX使从视图调用一个控制器(在我的情况下,使用JQuery),不返回任何东西?我只是设置会话一些变量并没有输出显示。

Is it possible to make a call from a view to a controller via ajax (in my case using JQuery) that doesn't return anything? I'm just setting some variables in session and there is no output to display.

我试着设置在我的控制器失效的方法,但它不会工作。现在我已标记的方法回报JSonResult,我只是返回JSON(),但似乎像一个有点浪费?

I tried setting the method on my controller to void but it won't work. Right now I've marked the method return as JSonResult and I'm simply returning JSon("") but that seems like a bit of a waste?

推荐答案

System.Web.Mvc.EmptyResult

阅读全文

相关推荐

最新文章