Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > how to redirect when the user is logged?

Reply
Thread Tools

how to redirect when the user is logged?

 
 
Chris
Guest
Posts: n/a
 
      01-07-2007
Hi,

i created a default page with loginview and loginstatus like this:

<asp:LoginView ID="LoginView1" runat="server">
<LoggedInTemplate>You are logged</LoggedInTemplate>
<AnonymousTemplate>You are not logged</AnonymousTemplate>
</asp:LoginView>
<asp:LoginStatus ID="LoginStatus1" runat="server" />

When logged, the user sees he's logged but is still in the default page. Is
it possible to redirect the user to another page immediately when he is
logged?

Thanks
Chris


 
Reply With Quote
 
 
 
 
Chris
Guest
Posts: n/a
 
      01-07-2007
i found it:
If User.Identity.IsAuthenticated Then

Response.Redirect(String.Format("file.aspx"))





"Chris" <.> schreef in bericht
news:%...
> Hi,
>
> i created a default page with loginview and loginstatus like this:
>
> <asp:LoginView ID="LoginView1" runat="server">
> <LoggedInTemplate>You are logged</LoggedInTemplate>
> <AnonymousTemplate>You are not logged</AnonymousTemplate>
> </asp:LoginView>
> <asp:LoginStatus ID="LoginStatus1" runat="server" />
>
> When logged, the user sees he's logged but is still in the default page.
> Is it possible to redirect the user to another page immediately when he is
> logged?
>
> Thanks
> Chris
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Response.redirect does not redirect from .aspx page =?Utf-8?B?VHJveQ==?= ASP .Net 3 10-15-2008 09:07 PM
Redirect to secure FTP site via response.redirect Ron Howard ASP General 2 08-11-2004 07:40 PM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM
redirect user to same server in clustered web farm sampriti ASP .Net 0 07-09-2003 02:45 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57