D Dave Feb 14, 2010 #1 Is it possible to get User.Identity.Name information in a class? If so...How? Thanks
K Konrad Neitzel Feb 14, 2010 #2 Hi Dave! Dave said: Is it possible to get User.Identity.Name information in a class? If so...How? Click to expand... 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
Hi Dave! Dave said: Is it possible to get User.Identity.Name information in a class? If so...How? Click to expand... 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
F Family Tree Mike Feb 14, 2010 #3 Is it possible to get User.Identity.Name information in a class? If so...How? Thanks Click to expand... 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#.
Is it possible to get User.Identity.Name information in a class? If so...How? Thanks Click to expand... 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#.
D Dave Feb 14, 2010 #4 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#. Click to expand...
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#. Click to expand...