I am building a asp.net web application in Visual Basic .NET and want to compare data in a cookie with a string. Now, when I do so, I recieve a error (Object reference not set to an instance of an object).
So I tried about everything and it still wouldn't work. Why? Someone please help me.
---- Code (Example) ----
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Request.Cookies("cookie1")("item1") = "12345" Then
Response.Write("It works!")
Else
Response.Write("At least no error...")
End If
End Sub