C# code for identify log in user of a website and how to display log in username in a label
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ramasagar PulidindiPosted Jan 22, 2014, 11:00 AM
u can use Session.... just make sure that session is valid ... so that it would not raise when session is timed out or invalid
if(Session["UserId"] != null) {
Label1.Text = Session["Userid"].ToString();
}