You may want to add this attribute in case you ever use out of process session state (StateServer).
Then you classes and structures need to be serializable. May as well build it in up front.
<Serializable>_
public structure Gen_setup
--
Joe Fallon
"Darren Clark" <dc******@hotmail.com> wrote in message news:O6*************@TK2MSFTNGP10.phx.gbl...
I think this is what you are after.
public structure Gen_setup
Dim Nominal As Long
Dim TaxCode As Integer
Dim VATNo As String
Public Sub New(pNominal as long, pTaxCode as Integer, pVATNo as String)
Me.Nominal = pNominal
Me.TaxCode = pTaxCode
Me.VATNo = pVATNo
End Sub
end structure
Session["mySessionVar"] = new Gen_setup(21,6,"some string here")
"starbuck" <st******@mbssoft.co.uk> wrote in message news:uQ**************@tk2msftngp13.phx.gbl...
Hi
My first vb.net/asp.net application is taking shape now and I have started
using session state to store user variables or type string, long and bool..
The VB6 app I am converting also makes great use of global variables as per
the example below
Structure Gen_setup
Dim Nominal As Long
Dim TaxCode As Integer
Dim VATNo As String
End Structure
Public setups As Gen_setup
I want to convert this to session state, can anyone show me the best way.
Thanks in advance.
---
Outgoing mail is certified Virus Free, so am I.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.677 / Virus Database: 439 - Release Date: 04/05/2004