Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 15th, 2006, 03:21 PM
Friend of Wrox
 
Join Date: Aug 2006
Location: norcross, Ga, USA.
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default redirect to page other than default page

hi all

in my application, i am using the login function from the code, and if the userid is returned, it get redirected to defualt page.

after i signout, and then i sign in with a different username and password, it is redirected to default page.
actully i want to make it redirected to productbrowsing page.

is there any way to do that?

thanks

  #2 (permalink)  
Old December 15th, 2006, 03:33 PM
Registered User
 
Join Date: Oct 2006
Location: Coppell, TX, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try:

Server.Transfer("nameofyourpage")

Ex) Server.Transfer("frmEditApt.aspx")

OR

Response.Redirect("nameofyourpage")

Ex) Response.Redirect("frmEditApt.aspx")


  #3 (permalink)  
Old December 15th, 2006, 03:47 PM
Friend of Wrox
 
Join Date: Aug 2006
Location: norcross, Ga, USA.
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default

no, i was not asking that.
in my application, the user browse product, add some products to cart, and then place order.
before placing order, this login page comes.
so if the user has selected the products already, then it should be the same as now, redirecting to default page.

suppose, the user first login, beofre selecting any product, then, after he sign in, can he go back to product browisng page?

  #4 (permalink)  
Old December 15th, 2006, 05:45 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You can do it, you just cant use the FormsAuthenctication.RedirectFromLoginPage() method you have to do somethign like this:

            Dim authTicket As New FormsAuthenticationTicket("[username]", [bool], [int])

            Dim encTicket As String = FormsAuthentication.Encrypt(authTicket)
            Response.Cookies.Add(New HttpCookie(FormsAuthentication.FormsCookieName, encTicket))

            Response.Redirect("[your page]")

The overload that i provided for the Authentication ticket is similar to FormsAuthenctication.RedirectFromLoginPage(); the bool value is if the cookie is persistent or not and the int value is the timeout for the cookie.

hth.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page redirect help jroxit Classic ASP Basics 7 August 11th, 2008 11:01 AM
Redirect to new page without closing current page peter2004 ASP.NET 2.0 Basics 5 June 5th, 2006 08:49 PM
Redirect to next page qazi_nomi Javascript How-To 1 September 1st, 2004 02:07 AM
Redirect page Warbird Classic ASP Basics 4 June 20th, 2003 07:51 PM



All times are GMT -4. The time now is 03:01 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.