3
Answers

Difference between 4 statements - PLease Explain

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)