How do I get access to the User.Identity.Name in the codebehind mo

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

Can somebody tell me how I can code the Page_Load event to set the Text
property of a label to reflect the User.Identity.Name?

Thanks.

venki
 
vvenk said:
Hello:

Can somebody tell me how I can code the Page_Load event to set the Text
property of a label to reflect the User.Identity.Name?

Thanks.

venki

It depends when the User.Identity.Name property is set (assuming the User =
HttpContext.Current.User). If you are setting it yourself at a later time
and it is empty (or an unexpected value) at Page_Load, then you are setting
it too late :)

HTH,
Mythran
 
Back
Top