Re: Altering RedirectFromLoginPage redirction page
- From: "Ben Fidge" <ben.fidge@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 6 Nov 2005 13:21:47 -0000
I actually solved it using the following in the Confirm button OnClick:
FormsAuthenticationTicket oTicket = new FormsAuthenticationTicket(
1,
sUserName
DateTime.Now,
DateTime.Now.AddMinutes(20),
false,
"",
FormsAuthentication.FormsCookiePath);
// Encrypt the ticket.
string oEncTicket = FormsAuthentication.Encrypt(oTicket);
// Create the cookie.
Response.Cookies.Add(new
HttpCookie(FormsAuthentication.FormsCookieName, oEncTicket));
Response.Redirect("UserRegistered.aspx");
"Mr Newbie" <here@xxxxxxx> wrote in message
news:unpUjQt4FHA.1536@xxxxxxxxxxxxxxxxxxxxxxx
> Why dont you add the functionality to the same page ie (Login or
> Register), you could optionally have a new form pop up to take the details
> and return them to the login form. One successfull registration is
> complete, the fields for username and password could be automatically
> filled in ready for login.
>
> --
> Best Regards
>
> The Inimitable Mr Newbie º¿º
>
>
>
> "Ben Fidge" <ben.fidge@xxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:%23Xu9ghs4FHA.3036@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi
>>
>> I have an app that requires the following scenarios:
>>
>> - A registererd user can login via a login page. This will redirect
>> them to Default.aspx via the use of
>> FromsAuthentication.RedirectFromLoginPage
>> - A new user can register and on completion, will automatically get
>> logged in and then get redirected to a different page.
>>
>> I can't implement the second scenario using RedirectFromLoginPage as it
>> insists on going to default.aspx. However, on completion of registration,
>> it would be very nice to autatically log the user in and then redirect
>> them to this other page.
>>
>> Is there any way of doing this with ASP.NET?
>>
>> Ben
>>
>>
>
>
.
- References:
- Altering RedirectFromLoginPage redirction page
- From: Ben Fidge
- Re: Altering RedirectFromLoginPage redirction page
- From: Mr Newbie
- Altering RedirectFromLoginPage redirction page
- Prev by Date: Re: Altering RedirectFromLoginPage redirction page
- Next by Date: Re: Web.config Intellisense ASP.NET 2.0
- Previous by thread: Re: Altering RedirectFromLoginPage redirction page
- Next by thread: Displaying "Please wait" image on button click for lengthy process
- Index(es):