Author: Rdurrance | Posted on: 8/13/2008 7:37:38 PM | Views : 579

Hi all,

I have a page that when it loads for the first time it should take the Session ID & DateTime and write and insert it to a database. 

My problem is that I keeps instering lines to the DB every time something is clicked on the page.  I have a couple of listboxes on the page they are set to Auto PostBack.  Here is the kicker....  If I do this: 
If Not Page.IsPostBack Then

Dim SesID As String = Page.Session.SessionID

SesLbl.Text = SesID

Dim SesTime As String = Date.Now.ToString

TimeLbl.Text = SesTime

SesDS.Insert() 'SesDS is an AccessDataSource

End If

Go to the complete details ...