Session_End Event Always Firing

J

Jeremy

I am implementing a shopping cart on a project and am getting extremely
frustrated because my session variable's are not persisting. After
doing some research I may have discovered the source, I realized that
my session_end event is firing on almost every page. The session_end
event isn't supposed to fire on every page is it? If not, what are some
things I can do to stop this behavior? Thanks in advance for your
input!

Code Below:

Function makeCart()
'Shopping Cart
Dim objDT As System.Data.DataTable

objDT = New System.Data.DataTable("Cart")
objDT.Columns.Add("ID", GetType(Integer))
objDT.Columns("ID").AutoIncrement = True
objDT.Columns("ID").AutoIncrementSeed = 1

objDT.Columns.Add("Quantity", GetType(Integer))
objDT.Columns.Add("Product", GetType(String))
objDT.Columns.Add("Cost", GetType(Decimal))

Session("Cart") = objDT

End Function

- Jeremy
 
K

Kevin Spencer

Hi Jeremy,

The only code you posted is a function called "makeCart()." It isn't in any
context, and there's nothing in it that would cause a Session to end. There
must be something else that is common to all pages in your app which is
causing the Session to end.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but you can't make it stink.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top