how i can put and get session value

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 9 años
Hello All,

How i can put and get session value in below file.

\Libraries\Nop.Services\Authentication\FormsAuthenticationService.cs

Regards,
Abdhesh
Hace 6 años
You get done this, if yes then share detail.

Thanks
Hace 6 años
vasuvora wrote:
You get done this, if yes then share detail.

Thanks


See How nop Handle

==>
Set:

  //session save
//get payment info
                    var paymentInfo = paymentController.GetPaymentInfo(form);
                _httpContext.Session["OrderPaymentInfo"] = paymentInfo;  //HttpContextBase _httpContext; have to initiate it


Get:

 
var processPaymentRequest = _httpContext.Session["OrderPaymentInfo"] as ProcessPaymentRequest;
Hace 3 años
Hello sohel,

I'm getting this error,

Cannot apply indexing with [] to an expression of type 'ISession'

Any help please?
Hace 3 años
Try using a Get() for appropriate type) - e.g.

HttpContext.Session.GetString("key");
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.