• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Problems reading cookies in .Net

GoingUp

Lifer
I am trying to read a cookie with a subkeys to display a message. The cookie name is userID and the subkeys are called firstName and lastName Here is the error message that I get.

Object reference not set to an instance of an object.

Here is the code that I currently have.

Dim fname As String
Dim lname As String

fname = Server.HtmlEncode(Request.Cookies("userInfo")("firstName"))
lname = Server.HtmlEncode(Request.Cookies("userInfo")("lastName"))



Label2.Text = "Welcome back " & fname & " " & lname
 
sorry. not at the right computer to quickly look up the syntax. does Request.Cookies("userInfo") return anything that's not Nothing?
 
Back
Top