This topic is locked

Is this possible?

9/16/2009 11:34:50 AM
ASPRunnerPro General questions
J
jmccullough author

Not sure if this is possible but, can I as soon as logging in, be redirected to the Search page only instead of the List page? This is a request from my boss. I'm not sure why but he wants, when a user logs in, not to have ANY records display, he wants them to have to do a search to display only the requested records!!!! Doesn't make sense to me but I just try and do what I'm told to do.
Any help or solutions you may be able to offer will be greatly appreciated.
Thank you.

Sergey Kornilov admin 9/16/2009

To make this happen use AfterSuccessfulLogin event and sample action "Redirect to another page".

J
jmccullough author 9/16/2009

Sergey, thank you for the quick response. I inserted this
Response.Redirect "Search.asp"
and rebuilt my project but now I get the error "Page cannot be found".
Any suggestions?

J
jmccullough author 9/16/2009

Ok, not sure what I'm doing so now I changed the code to:
Response.Redirect "Officialstbl_Search.asp"
and it bypassed my login page and went directly to an "Advanced Search" page. Is there some other code I'm missing?
Any help is appreciated.

C
clig 9/16/2009



Ok, not sure what I'm doing so now I changed the code to:
Response.Redirect "Officialstbl_Search.asp"
and it bypassed my login page and went directly to an "Advanced Search" page. Is there some other code I'm missing?
Any help is appreciated.


  • in the aftersuccessful login event
  • if your list page is: CCAP_Comments_list.asp for example then your search page would be CCAP_Comments_search.asp
    // After successful login

    Sub AfterSuccessfulLogin(username,password)
    Response.Redirect "CCAP_Comments_search.asp"
    End Sub ' AfterSuccessfulLogin
    This page needs to be a part of your project that the login pages belong to

J
jmccullough author 9/17/2009

Thanks for your assistance, that works perfectly!! But let me ask this, it now takes me to an "ADVANCED SEARCH" page and I would like only a basic search. Is "ADVANCED SEARCH" the default? And secondly, when I'm logged in as ADMIN and add a new record and try to go "Back to list", I receive an error of "Page Not Found", so by putting the redirect code in does this prevent me from ever going back to the list page?
Thanks for everyone's help.

C
clig 9/17/2009



Thanks for your assistance, that works perfectly!! But let me ask this, it now takes me to an "ADVANCED SEARCH" page and I would like only a basic search. Is "ADVANCED SEARCH" the default? And secondly, when I'm logged in as ADMIN and add a new record and try to go "Back to list", I receive an error of "Page Not Found", so by putting the redirect code in does this prevent me from ever going back to the list page?
Thanks for everyone's help.


Simple search on "list" page but check off "no records on first page"
Make sure "List" is checked as an option and the permissions are set
If you have the redirect only in the login event then it would have no effect on your other pages

J
jmccullough author 9/17/2009

Your suggestion worked perfectly, exactly what I was looking for!!!! Thanks very much for your help.