Nov 5, 2014

Accessing Session Values Inside The HTML Body

You Can Use Following Codes Inside A html body Tag To Access Session Variable Values.

<%
   if (Session["LoginName"] != null)
   {
%>
      <div class="sLoginName" style="visibility: hidden">
<% 
   = Session["LoginName"].ToString() 
%> 
      </div>
<%
   }
%>
<%  
   else
   {
%>
      <div class="sLoginName" style="visibility: hidden">Guest</div>
<%
   }
%>

No comments:

JWT Token Decode Using Jquery

When it come to authentication we use many mechanism. Ones the user authenticated we must keep these details somewhere safe. So we can share...