79147333

Date: 2024-11-01 08:21:42
Score: 1
Natty:
Report link

How it's accomplished:

Module SesVars    
    Public Function s(ByVal SesVarName As String, Optional ByVal SesVal As String = Nothing)
        If SesVal IsNot Nothing Then System.Web.HttpContext.Current.Session("" & SesVarName & "") = SesVal
        If System.Web.HttpContext.Current.Session("" & SesVarName & "") Is Nothing Then s = Nothing : Exit Function
        s = System.Web.HttpContext.Current.Session("" & SesVarName & "")
    End Function
    Public Sub sr(ByVal SesVarName)
        System.Web.HttpContext.Current.Session.Remove("" & SesVarName & "")
    End Sub   
End Module
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): How it
  • Low reputation (1):
Posted by: Kevin