Display user name
I have used login control in login.aspx and I want that when user logged in only user name display rest of the pages.
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.
Gomathi PalaniswamyPosted Jun 9, 2011, 1:49 AM
you can achive this by session and query string.
protected void Page_Load(object sender, EventArgs e)
{
Login1.FormatString ="sss";
}
use the login1 ..
use the below link for some other methods
http://forums.asp.net/t/1367379.aspx/1?Display+user+name+in+the+header+when+logged+in
Sandeep ShekhawatPosted Jun 9, 2011, 1:49 AM
Use this at Login Button Click Event
Session["username"]=Login1.UserName;//Login1 is Login control ID
another page it display in page use label control
use at Page_Load Method
Label1.Text=Session["username"] //Label1 is Label control ID