Open PrasanthiPonnada opened 7 years ago
Can someone please look into this issue
This would be possible but the dll would need to be recompiled with IRequiresSessionState
implemented on the MVCGridHandler
like this:
public class MVCGridHandler : IHttpHandler, IRequiresSessionState
Why don't you add this as default? I think many users needs to access HttpContext inside MvcGridConfig. There shouldn't be need to do a custom build just for single inheritance.
I need the same thing, tryed to put Httpcontext to get current session and I get a null value.
Hello, Any solution for this issue? Regards,
@joeharrison714 suggested a solution that works so I'll elaborate on it.
Disclaimer: all references here are from the project as of 2019.12.31
1) Fetch an instance of the MVCGrid.Net project from https://github.com/joeharrison714/MVCGrid.Net
2) Go to the MVCGridHandler
file located at MVCGrid\Web\MVCGridHandler.cs
3) Have MVCGridHandler
inherit from the IRequiresSessionState
by adding a using reference to the System.Web.SessionState
namespace such that lines 16-20 are rewritten as:
using System.Web.SessionState;
namespace MVCGrid.Web
{
public class MVCGridHandler : IHttpHandler, IRequiresSessionState
We have implemented mvc grid in our Application. We have a requirement that we need to assign and read the session values in MVC grid config but the session is always showing as null even we have session in our application. Can we assign and read the session values in mvc grid?. We are stuck at this point, Can any body please help us asap.