spaceman
spaceman

Reputation: 1648

ASP.Net MVC JQuery Ajax Call That Doesn't Return Anything

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.

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?

Upvotes: 3

Views: 805

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038710

System.Web.Mvc.EmptyResult

Upvotes: 5

Related Questions