Monday 15 July 2013

asp.net - Changing visibility of Log-out button from serverasp -


I am now building a site with users' database. If the session is present I would like to add the "Log-out" button to the menu. I thought after checking the session I would change the visibility property in CSS. How can i do it Thank you.

OK, about something like this:

javascript: < / P> PageMethods.IsSessionActive (Active, Onscue, On Error); Success on function (results) {if (result == "true") {// logic where logout button is set to be visible} other {// set hidden}}

C # server Side Web Method:

  [WebMethod] The public static string IsSessionActive (string is active) // // is active active // ​​active is active = active " ; "; The return is active; }    

No comments:

Post a Comment