Thank you for your reply, seems that I am close enough.
Now, as per your instructions, I have created that si object.
I want to get the si objects SessionUserName.
But it throws,
NullReferenceException: Object reference not set to an instance of an object.---------
My code snippet for your reference:
SessionInfo si = SessionManager.CurrentSession;
string UsrName = si.SessionUserName.ToString();
[and a code behind alert showing UsrName value]
PS: This happens when I preview it in live mode. Normally, the alert would work showing
Administrator name.
Should I use
CurrentUser.Username();
Does that has to do something regarding sessions?
Or for
si.SessionUserName.ToString();
I need to pass hardcoded values?
Please guide me.