I wrote an IF statement in order to check if the cookies exists. If it does exist than it prints the user's name on the page, otherwise if it does not exist (in my case the cookie I'm checking for does NOT exist) the user is redirected to the login page.
Public Sub CheckCookie()
If Not Request.Cookies("userInfo")("UserID") Is Nothing Then
When I load the page into a browser I'm getting the following error:
Any idea what I could be doing wrong?