Hi,
I'm getting an Object reference error and I'm sure the problem is because the LoginTarget cookie hasn't been set, this is possible if a user came to the login page first, without attempting to visit a restricted page first.
I'm using IsNothing to check to see if it's been created but it doesn't seem to be working does anyone know of a better way of handling this?
VB Code:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 78: Response.Cookies("User_ID").Value = User_ID Line 79: [HL="#FFFF00"]Line 80: Response.Redirect(Convert.ToString(IIf(IsNothing(Request.Cookies("LoginTarget")), _ RedirectPage.ToString, Request.Cookies("LoginTarget").Value)), False)[/HL] Line 81: 'Response.Redirect(RedirectPage.ToString, False) Line 82: Else




Reply With Quote