When I use the Session in component class as Session(‘CustID’), I get error message ‘Session is not declared’. Why?

Platform: ASP.NET| Category: Session

Use HttpContext.Current.Session i.e
VB.NET


HttpContext.Current.Session('CustID') = '1'

C#


HttpContext.Current.Session['CustID'] = '1';

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.