I have an app that has been working just fine to date, but recently started dropping session.
I have enclosed the error messages I am getting, but do not know what to make of them.
The errors happen on page_load after leaving my login page or on postback.
Object cannot be cast from DBNull to other types.
Operator '<>' is not defined for type 'DBNull' and type 'DBNull'.
Here is the page load event on the default page:
If Request.QueryString("LostSession") = "True" And Not IsPostBack Then
Me.Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "SessionWarning", "alert('Your session was lost.');", True)
Here is the page load event on the second page:
If IsNothing(Session("id")) Or Not IsNumeric(Session("id")) Then