MVC Controller - HTTPContext is NULL
Hi ,I am trying to access 'httpcontext' inside of a method in controller1.
Actually I am calling this method from another controller2 by creating through object(controller1).But httpcontext is null, please throw some light here.
public class Controller1{
//My actions go here
public void custommethod()
{
var temp=httpcontext.server.map('some value here');
}
}
//Here my another controller class
public class Controller2{
Controller1 obj= new Controller1();
obj.custommethod();
}