Capture Login Name at string

Discussion in 'ASP .Net Building Controls' started by Ann, Jun 1, 2007.

  1. Ann

    Ann Guest

    I have a formview control that I want to capture the login name and add it to
    the database when the insert template is used. I use the asp:loginview
    control and can see the login name, but I want capture that as a string and
    add it to a sql database column. How do I do that?


    Thank you for your time.
     
    Ann, Jun 1, 2007
    #1
    1. Advertising

  2. Ann

    PlatinumBay Guest

    Ann,

    You can get the username with the following code:

    Context.User.Identity.Name

    Hope this helps,


    Steve

    "Ann" <> wrote in message
    news:...
    >I have a formview control that I want to capture the login name and add it
    >to
    > the database when the insert template is used. I use the asp:loginview
    > control and can see the login name, but I want capture that as a string
    > and
    > add it to a sql database column. How do I do that?
    >
    >
    > Thank you for your time.
    >
    >
    >
     
    PlatinumBay, Jun 4, 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. Chris

    ASP.NET capture login id... LDAP?

    Chris, Feb 17, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    10,436
    cenimalu
    Jul 21, 2007
  2. Max
    Replies:
    7
    Views:
    9,126
  3. Vincent Cantin
    Replies:
    3
    Views:
    706
  4. How Capture windows2003 users login and logoff time.

    , Jun 24, 2007, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    751
    Teemu Keiski
    Jun 30, 2007
  5. Replies:
    1
    Views:
    397
Loading...

Share This Page