Check session status

P

Paul_E21MEDIA

I have a search form on my home page. However, I only wanted logged in
users to see the search results. It currently allows anyone to view
the search results. Have tried using something like:

If Session("UserID") = 0 Then response.redirect("/notloggedin.asp")

<form action="searchresult.asp" method="get" >

However, it only redirects to the login page, each time someone tries
to visit the site. I still want non members to view the home page,
just not the search results unless they sign up and then log in.

Basically, I want this dynamic functionality across the site, so that
users can view pages dependent on their logged in status. Right now
I'm just redirecting everything to notloggedin.asp
 
G

Guest

Looks to me like your question is about classic ASP, not ASP.NET. Try the ASP
newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top