ASP.NET MVC Action Filter - Ajax Only Attribute(helios.ca)
submitted by
helios(85) 2 years, 8 months ago
The website I’m currently working on has a lot of AJAX incorporated in it, so my controller has a few actions which are only called in AJAX. At first I was using HttpContext.Request.IsAjaxRequest() within my action to control if the request was indeed an Ajax one, but I didn’t like the fact that I needed to call HttpContext in my control; it also made a lot of redundant code. That is why I decided to build an Action Filter that would do that for me.
|category: MVC
|Views: 106
tags:
MVC another
Everyones tags:
Your Tags: