I am trying to create a check cookie server side script that will work in both Classic ASP pages and VB.NET pages. I have been unsuccessful. Example below:
<% If Request.Cookies("login-id") = "" Then Response.Redirect("login.asp") %>
This works on my Classic ASP pages, but in .NET, it throws an error because when there is no cookie, it throws an exception because it can't read a cookie that doesn't exist.
Is there a way for me to craft the script in a way that would work in both Classic and VB.NET?