Re: Check User session before display form search results

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Mar 17, 9:00 pm, "Paul_E21MEDIA" <p...@xxxxxxxxxxxx> wrote:
Hi,

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.

I think the coorect statement is

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

.



Relevant Pages

  • Check User session before display form search results
    ... I have a search form on my home page. ... However, it only redirects to the login page, each time someone tries ... I still want non members to view the home page, ...
    (microsoft.public.inetserver.iis.activeserverpages)
  • Architecture meditations...
    ... Search form and a DataCapture form. ... Login form is used once, after authentication it is not needed. ... the user will be switching between data capture and search. ... DataCapture form is on, the Running Program List of the device will show ...
    (microsoft.public.dotnet.framework.compactframework)
  • how to handle two forms in cgi?
    ... user login by their username and password in a form (login ... should show second form for users in their browser. ... second form (search form) which contain last name, ... which users input data. ...
    (comp.lang.python)
  • passing values between web forms usign session variables
    ... I always use session variables to pass values ... That is if I get a username, password in a Login ... The search form needs to know who login to display the ...
    (microsoft.public.dotnet.framework)