I want to have a method returning ActionResult, that has access to Response/Json and other things controllers have access to and use it from multiple controllers.
Any pointers?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could consider making a base controller class and inheriting from that. This allows you to use the same method from multiple controllers.
I’m not sure of your experience level with MVC, but this article from Microsoft gives the basic foundations of ideas behind the controller and what you can do with it. And this question points to some well accepted examples of an MVC app.