1
Reply

how do i find the status of loginstatus?

Gary

Gary

Jan 10 2006 2:49 PM
2.3k
Hello i am using visual studio and c# for a project at university. I have only just started using c# I have a website which you can log in and out of. I have a lable on my site that contains text saying "you are logged in as:" next to it is the [loginname]. i want to be able to hide the lable when nobody is loged in. and reveal the lable when they are. i know i can use .visible = true/false on the lable. i also realise it needs to be in an if statement. How do i retrieve the status of the login status? i have tried putting if (loginstatus = true) when i do this it says: "CS0118: 'System.Web.UI.WebControls.LoginStatus' is a 'type' but is used like a 'variable'" is it possible to retrieve the status of the login status to use it as a condition?

Answers (1)