Alnother Class question

  • Thread starter Thread starter Dave
  • Start date Start date
Hi Dave!

Dave said:
Is it possible to get User.Identity.Name information in a class? If
so...How?

Sorry, I really have a problem to understand what you mean.

If you want to get the name of the User, that runs the current Thread, maybe
this will help:

Thread.CurrentThread.CurrentPrincipal.Identity.Name

If you are looking for something else, then I simply need some more
explanation to understand what you mean.

With kind regards,

Konrad
 
Is it possible to get User.Identity.Name information in a class? If
so...How?

Thanks

Yes it is possible. The way I have always done this outside code-behind
code is via HttpContext.Current.User.Identity.Name.

If I'm understanding the question though, it is probably better asked in
an ASP.Net group, as it really is more to do with ASP.net than C#.
 
Thanks Guys!












Yes it is possible.  The way I have always done this outside code-behind
code is via HttpContext.Current.User.Identity.Name.

If I'm understanding the question though, it is probably better asked in
an ASP.Net group, as it really is more to do with ASP.net than C#.
 
Back
Top