I add class.
vb to my project, I named it âClassPublic.
vbâI defined in this class variable as array , integer ,string. Like that:
Public Recordset2Array1 (10, 600) As String
Public Recordset2Array2(10, 600) As String
Public Recordset2Array3 (10, 15) As String
Public Recordset2Array4(10, 600) As String
Public strDemand5 (100) As String
Public Min1(10, 300) As String
Public Min2(10, 300) As String
Public Rows As Long
Public RowsShow As Long
Public SumTotals As Double
Public SumTotals1 As Double
I define session as ClassPublic in Global.asax.
vb:
Session ("ClassPublic") = New ClassPublic()
I use Session ("ClassPublic") for saving global variable for that reson
I define Session ("ClassPublic") in aspx.
vb:
Dim Parameters As ClassPublic = CType(Session("ClassPublic"), ClassPublic)
Parameters. Recordset2Array4(I,x)=j
When I run it,it show massage error:
âSession State can only be used when enableSessionState is set to true, either in a configuration file or in the Page directiveâ
I define in mashine.confog and web.config ,it is not definision problem in
mashine.confog and web.config for sure
In this way it is work:
CType(Session("ClassPublic"), ClassPublic) . Recordset2Array4(I,x)=j
But it takes big memory usage in aspnet_wp.exe so the application fails
I donât understand why in this way I get error:
Parameters. Recordset2Array4(I,x)=j
Please help
Maybe exists deferent way for saving global variable in asp.net