I have an object from a database that is used in a lot of places in my application. The actual precise object is a bit complicated to build, and, especially during development, I have changed it seve
If a user is not authorized to execute an action, in HandleUnauthorizedRequest, I redirect the user to the error action. This results in a 302 error.
In facebook after I shared something in my wall I get a nice pop message about my activity. Sometimes whenever there is an error with they gave a nice pop about the error. Like this.
I have a controller ActionResult that returns JSON that I would like to cache.After doing some research, I have found that the OutputCache Attribute can do the trick, but haven\'t been able to success
Is it even possible to return a view from an ActionFilterAttribute? Right now i just have it throw an error and in the OnException in the base controller reroutes to an error page. Would liek to show
I\'ve got a snippet of code in a custom ActionResult VB.NET Version Dim result As New ViewResult() 开发者_C百科result.Model= data## Property Model is ReadOnly
I am new to MVC3. I have a submit button on a form and I want to bind a model which has 2-3 nested object models with many properties inside.
So I have a HttpPost only ActionResult called Edit. After doing its thing (logic etc), I want it to redirect to a different controller. Lets say the HomeController. Here it is:
I\'m using MVC 3 I would like to dynamically create a CSV file for download, but I am unsure as to the correct MVC orientated approach.
From some of the action methods I want to return a result that will force current page to refresh. I wrote this to acquire such result: