Theme Controls: Login

Adding the Login element will work with your OneNet Site settings to show your login information. This element should be put between tags such as span, div, or td/th.

There are two ways to show your login options.

The first is plain text:

<OneNet:Login Type="Templated" RunAt="server">
  <LoginTemplate>
    <a href="<%# Container.LoginUrl %>">Login</a>
  </LoginTemplate>

  <RegisterTemplate>
    <a href="<%# Container.LoginUrl %>">Login</a> | <a href="<%# Container.RegisterUrl %>">Register</a>
  </RegisterTemplate>

  <LogoutTemplate>
    User [ <a href="<%# Container.UserUrl %>" title="Cick Here To Edit Your Account Profile"><%# Container.User.FullName %></a> ] | <a href="<%# Container.LogoutUrl %>">Logout</a>
  </LogoutTemplate>
</OneNet:Login>

 

The second is to display your login options with images:

<OneNet:Login Type="Templated" RunAt="server">
  <LoginTemplate>
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td class="imgblock"><!--Place image here--></td>
        <td><a href="<%# Container.LoginUrl %>">Login</a></td>
        <td class="imgblock"><!--Place image here--></td>
      </tr>
    </table>
  </LoginTemplate>
  <RegisterTemplate>
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td class="imgblock"><!--Place image here--></td>
        <td><a href="<%# Container.LoginUrl %>">Login</a></td>
        <td class="imgblock"><!--Place image here--></td>
        <td class="imgblock"><!--Place spacer image here--></td>
        <td class="imgblock"><!--Place image here--></td>
        <td><a href="<%# Container.RegisterUrl %>">Register</a></td>
        <td class="imgblock"><!--Place image here--></td>
      </tr>
    </table>
  </RegisterTemplate>
  <LogoutTemplate>
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td class="imgblock"><!--Place image here--></td>
        <td><a href="<%# Container.UserUrl %>" title="Cick Here To Edit Your Account Profile"><%# Container.User.FullName %></a></td>
        <td class="imgblock"><!--Place image here--></td>
        <td class="imgblock"><!--Place spacer image here--></td>
        <td class="imgblock"><!--Place image here--></td>
        <td><a href="<%# Container.LogoutUrl %>">Logout</a></td>
        <td class="imgblock"><!--Place image here--></td>
      </tr>
    </table>
  </LogoutTemplate>
</OneNet:Login>

 

Themeing the Login Control

There are three stages of the Login Control.

  • Login only
  • When register is turned off in the Site Settings. Only a Login will be shown. This is the information between the <LoginTemplate> tags.

  • Login and Register
    When register is turned on in the Site Settings. Users will have an option to Register on your site and be able to login and take advantage of whatever privaledges you give them. This information is shown between the <RegisterTemplate> tags.
     
  • Username and Logout
    After a User is logged into your site. The Login control will change to its third mode, and give the User to change his information or Log Out. This information is shown between the <LogoutTemplate> tags.

Between these tags mentioned span, div, or table structures can be used.