in web application, need display username logged in system. having text-box , button in form. example : if user "admin" logged in , using (local)system. once clicked button name admin has displayed in text-box.
please try below code getting current username
string username = system.security.principal.windowsidentity.getcurrent().name;
Comments
Post a Comment