473,388 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Check session status


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

Mar 21 '07 #1
1 2303
Looks to me like your question is about classic ASP, not ASP.NET. Try the ASP
newsgroup.

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Paul_E21MEDIA" wrote:
>
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

Mar 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you...
2
by: Gavin Lyons via .NET 247 | last post by:
Hello, I'm writing a newsletter application which uses backgroundthreading. I'm using Session variable to report on progresswhile it loops through a dataset. The 'Status.aspx' pagerefreshes every...
5
by: Mitul | last post by:
Hi to all, I am working on a site in which I need to check whether user is online or not. If user successfully logged out then I can change status from online to offline but if user do not...
1
by: Grzegorz Smith | last post by:
Hi everyone. Does anyone know is it possible to check if ajax call was redirect? i mean I connect by Ajax to one URL but I'm redirected to other url. Is there a way to check that my request was...
17
by: Riaan | last post by:
Hi guys! I have an issue that needs urgent resolution. Imagine this scenario: You have: 1 production server running Windows Server 2003, IIS6 and an instance of MSDE 2000. There is an...
0
by: kevin bailey | last post by:
I have a framework working where I have multiple pages each checking the authentication status. Unauthorised users are redirected to a login page - otherwise the requested page is shown. ...
4
by: Simon Gare | last post by:
Hi all, below is an insert statement on an asp page that stores the date and time that a driver logged on, what I need is to check that they are now already logged on fields are SQL Server...
6
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick...
0
by: Yasir Zaheer | last post by:
Hi, We are using Bloomberg API for .Net to connect to Bloomberg and get the field information for specific securities. The application is running on a Bloomberg terminal. While requesting, we...
2
by: ahd2008 | last post by:
Hi everybody, I have the table Sessions as shown below: Session ID Start Date End Date Location Seats AvailabeSeats
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.