User.Identify.Name

Discussion in 'ASP .Net' started by =?Utf-8?B?SmltIEhlYXZleQ==?=, Jun 7, 2004.

  1. I am not quites sure which happens first... the Form Load Event for the form or the form load event for the user control. I am wanting to obtain the User.Identify.Name in the UserControl, but I am not quite sure how to get a hold of the value. If I can only get it from the form which contains the control, how do I create a reference in the UserControl to the form which contains it? I tried to add a reference to the UserControl for the object which User object is derived from, but that did not seem to work

    Any Ideas?
    =?Utf-8?B?SmltIEhlYXZleQ==?=, Jun 7, 2004
    #1
    1. Advertising

  2. "Jim Heavey" <> wrote in message
    news:...
    > I am not quites sure which happens first... the Form Load Event for the

    form or the form load event for the user control. I am wanting to obtain
    the User.Identify.Name in the UserControl, but I am not quite sure how to
    get a hold of the value. If I can only get it from the form which contains
    the control, how do I create a reference in the UserControl to the form
    which contains it? I tried to add a reference to the UserControl for the
    object which User object is derived from, but that did not seem to work.

    Details, please, Jim.

    What exact problem are you having when you try to get User.Identity.Name
    from within the user control?
    --
    John Saunders
    johnwsaundersiii at hotmail
    John Saunders, Jun 7, 2004
    #2
    1. Advertising

  3. You need to access like this inside usercontrol

    Page.User.Identity.name

    --
    Saravana
    Microsoft MVP - ASP.NET
    www.extremeexperts.com



    "Jim Heavey" <> wrote in message
    news:...
    > I am not quites sure which happens first... the Form Load Event for the

    form or the form load event for the user control. I am wanting to obtain
    the User.Identify.Name in the UserControl, but I am not quite sure how to
    get a hold of the value. If I can only get it from the form which contains
    the control, how do I create a reference in the UserControl to the form
    which contains it? I tried to add a reference to the UserControl for the
    object which User object is derived from, but that did not seem to work.
    >
    > Any Ideas?
    Saravana [MVP], Jun 7, 2004
    #3
  4. From usercontrol first you need to access the page object in which this
    usercontrol is there then you can access other properties of page object.

    --
    Saravana
    Microsoft MVP - ASP.NET
    www.extremeexperts.com



    "Jim Heavey" <> wrote in message
    news:...
    > Thanks... Not shure why in the UserControl I have to prefix with Page

    object, but not in the page that calls it.
    >
    > Thanks.
    Saravana [MVP], Jun 8, 2004
    #4
    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. Sanjeev
    Replies:
    0
    Views:
    422
    Sanjeev
    Jun 23, 2008
  2. Sanjeev
    Replies:
    9
    Views:
    712
  3. Lew
    Replies:
    10
    Views:
    524
    Tom Anderson
    Dec 31, 2008
  4. deko
    Replies:
    4
    Views:
    234
    Michael Winter
    Aug 7, 2004
  5. Hoss
    Replies:
    3
    Views:
    103
    Thomas 'PointedEars' Lahn
    Apr 5, 2006
Loading...

Share This Page