not able to succeed - Akhilesh help me out

Results 1 to 4 of 4

Thread: not able to succeed - Akhilesh help me out

  1. #1
    sjv Guest

    Default not able to succeed - Akhilesh help me out

    hi<BR>I am not able to succeed with the redirect as well as Server Variables. My problem is this.<BR><BR>I have certain pages in the website which is content secured and only registered user is allow to browse the page. So from any of the pages if the user clicks to that links for eg. download he will be taken to the authorization page. If he is already register he can login and he has to be taken to the link which he clicked already eg. download page. If he is not a register a user after registration i have to redirect him to the page he requested.How to acheive this?<BR>

  2. #2
    duc Guest

    Default RE: not able to succeed - Akhilesh help me out

    First of all, if you are runing IIS5 you can use this<BR>&#060;%<BR>if (Session("UserName")= "" or Session("UserPassword") = "") Then<BR> Server.Transfer("Invalid.htm")<BR>End if<BR>%&#062;<BR><BR>If you are using IIS4 you have to use<BR>&#060;%<BR>if (Session("UserName")= "" or Session("UserPassword") = "") Then<BR> Response.Redirect("Invalid.htm")<BR>End if<BR>%&#062;<BR><BR>for the second method you have to add this line at very beginning of the page<BR>&#060;%Response.Buffer = True%&#062;<BR>I hope this help<BR>Duc

  3. #3
    Join Date
    Dec 1969

    Default RE: I am not Akhilesh

    You can use a If statement like this<BR><BR>If rs("Password")=mypassword then<BR> session("Login")=rs("LoginID")<BR> <BR>&#039 use the securitylevel to go to the right page<BR><BR> if session("Login")= 1 then<BR> response.redirect ("download.asp")<BR> <BR> end if<BR> <BR>else%&#062;<BR> &#060;% response.redirect(" p")%&#062;<BR><BR>Good Luck<BR>

  4. #4
    Join Date
    Dec 1969
    Los Angeles, CA

    Default I am Akhilesh

    When the user first comes to your registration page<BR><BR>session("prevPage") = Request.ServerVariables("HTTP_REFERER")<BR><BR><BR >after the registration process once you have finished everything<BR><BR>response.redirect session("prevPage")<BR><BR>this should take you back to the page the user came from

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts