Redirect Help

Redirect Help

am 08.05.2007 16:33:41 von Mangler

I thought I was doing this right but apparently I'm not as I keep
getting an error " object required "....

I am trying to redirect someone if a record set value is not equal to
something; here is what i have:

<%
If rsSec.Fields.Item("program").Value <> "Employee" Then
Response.Redirect "accessdenied.asp"
End If
%>

What am I doing wrong here? I the query returns a result when I
tested it out but the " object required " error keeps displaying....

Re: Redirect Help

am 08.05.2007 16:41:45 von Anthony Jones

"Mangler" wrote in message
news:1178634821.201484.239020@y5g2000hsa.googlegroups.com...
> I thought I was doing this right but apparently I'm not as I keep
> getting an error " object required "....
>
> I am trying to redirect someone if a record set value is not equal to
> something; here is what i have:
>
> <%
> If rsSec.Fields.Item("program").Value <> "Employee" Then
> Response.Redirect "accessdenied.asp"
> End If
> %>
>
> What am I doing wrong here? I the query returns a result when I
> tested it out but the " object required " error keeps displaying....
>

Object required sounds like a JScript error to me.

Where does it display? In the browser client window or in a message box?

Have you tried visiting accessdenied.asp directly using a browser?

Re: Redirect Help

am 08.05.2007 16:42:53 von Mangler

Nevermind! I had that code before the query on the page,,,,, DUH!


> I thought I was doing this right but apparently I'm not as I keep
> getting an error " object required "....
>
> I am trying to redirect someone if a record set value is not equal to
> something; here is what i have:
>
> <%
> If rsSec.Fields.Item("program").Value <> "Employee" Then
> Response.Redirect "accessdenied.asp"
> End If
> %>
>
> What am I doing wrong here? I the query returns a result when I
> tested it out but the " object required " error keeps displaying....