how to redirect when the user is logged?

Discussion in 'ASP .Net Web Controls' started by Chris, Jan 7, 2007.

  1. Chris

    Chris Guest

    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
     
    Chris, Jan 7, 2007
    #1
    1. Advertising

  2. Chris

    Chris Guest

    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
    >
     
    Chris, Jan 7, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. keithb
    Replies:
    0
    Views:
    662
    keithb
    Feb 16, 2006
  2. Chris
    Replies:
    1
    Views:
    501
    Chris
    Jan 7, 2007
  3. Replies:
    1
    Views:
    979
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 12, 2007
  4. Sal
    Replies:
    1
    Views:
    1,042
  5. mark

    Dispalying Welcome User to logged in user

    mark, Oct 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    385
Loading...

Share This Page