This code comes directly from Microsoft's site:
Imports System.Security
Add the following code to the Page_Load event procedure:
Dim authUserName As String
Dim aspUserName As String
authUserName = User.Identity.Name
aspUserName = Principal.WindowsIdentity.GetCurrent.Name
If I put the code in a webform (.aspx file) it works. But, if I try to
put it in a user control, I get the little blue squigly line under the
word User. (right before .Identity.Name). Why is that?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!