Im trying to write a small page that will be used within SharePoint. It is a quick employee clock-in/out page. Im having issues getting the currently logged on user's information to display on the page when used on SharePoint. I have tried using a few different
methods that I found via google, but the username will not show up on the page at all.
ckersey2
Member
94 Points
131 Posts
Get currently logged-in user
Jan 18, 2011 04:46 PM|LINK
Hi all,
Im trying to write a small page that will be used within SharePoint. It is a quick employee clock-in/out page. Im having issues getting the currently logged on user's information to display on the page when used on SharePoint. I have tried using a few different methods that I found via google, but the username will not show up on the page at all.
Does anyone have any ideas?
chase.kersey@med.navy.mil
gfedz
Member
197 Points
112 Posts
Re: Get currently logged-in user
Jan 18, 2011 08:13 PM|LINK
I'm not sure if this will help you on sharepoint or not but I use:
Imports System.Web.HttpContext
Dim myLogon As String = Split(Current.User.Identity.Name, "\")(1)
^^ traps logon, put the dim statement in any sub where you need to call the logon