01 March 2017
I have the below Controller class
public class HomeController : Controller
public ActionResult Index(CustomerModel model)
and I have a Validate.cs class file like below
public class Validate
public static void Test()
//Just assume this senario
In the test method of the Validate class we are not able to access the HttpContext.Application but we are able to access the HttpContext.Application in the HomeController.
I understand the HomeController inherit from Controller class because of that HttpContext.Application has value.
Is there anyway I can access the HttpContext.Application in a class which doesnot inherit Contoller class. Please help