Last post Jun 04, 2014 05:52 AM by Shawn - MSFT
Jun 01, 2014 07:31 AM|shaparak631|LINK
Hi and good day,
Im creating a login control manually
I cant use login status directly
there is a link button, I want tht when user logged in, it shows logout and when user not athenticated it shows login.
how can I?
Jun 04, 2014 03:04 AM|shaparak631|LINK
no need to answer this question, I found another solution, this was totally wrong way.
Jun 04, 2014 05:52 AM|Shawn - MSFT|LINK
Generally, for authenticating user, we can simply use the asp.net login control, however, for this situation, you want to simulate the login status control.
For implementing this, you could try to set a status in the masterpage page_load event to replace the loginstatus control and a lgoiname session to replace the loginname control:
Session["Loginstatus"] = "false";
if (Session["Loginstatus"].ToString() == "false")
After you check the login user input name and password, if they are correct, you could set the Loginstatus to true, and assgin the username to loginname also.
Besides, the ASP.NET login controls provide a robust login solution for ASP.NET Web applications without requiring programming, and you could take a look at: