Riddhi Valecha

Riddhi Valecha

  • 420
  • 3.3k
  • 412.8k

Difference between 4 statements - PLease Explain

Feb 11 2015 4:10 AM
Hi all... Please Explain........

What is the difference between -

1. Page.User.Identity.Name

2. HttpContext.Current.User.Identity.Name.ToString();

3. System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();

4.System.Environment.UserName;
-----------

Which statement is to be used in which scenario ??
-------
Please explain.

Please give some links/ examples/ explanation...

I have googled it, but no clear idea till date...

Answers (3)