Link to home
Start Free TrialLog in
Avatar of mathieu_cupryk
mathieu_cuprykFlag for Canada

asked on

Easy question to put a logout button instead of a link.

if you got to omegalove.com
and try
username:mathieu
password:cupryk

U will get a logout linkbutton.
I would like to change this to a button.
<%@ Control Language="C#" AutoEventWireup="true"  CodeFile="Login.ascx.cs" Inherits="Controls_Login" %>
          <link href="../App_Themes/PlainHtml/Default.css" rel="stylesheet"
    type="text/css" />
          <div id="loginbox">
            <asp:LoginView ID="LoginView1" runat="server">
            <AnonymousTemplate>
               <asp:Login ID="Login" runat="server"
                    DestinationPageUrl="~/Profile.aspx" FailureAction="RedirectToLoginPage"
                    Height="31px">
                  <LayoutTemplate>
                   <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                           <td>
                           <asp:Label runat="server" ID="lblUserName" AssociatedControlID="UserName" Text="Username:"  />
                           <asp:TextBox id="UserName" runat="server" BorderColor="DarkGray"
                                   BorderStyle="Inset" BorderWidth="2px" />
                           <asp:RequiredFieldValidator ID="valRequireUserName" runat="server" SetFocusOnError="True"
                                 ControlToValidate="UserName" Text="*" ValidationGroup="Login"  />                    
                               <asp:Label ID="lblPassword" runat="server" AssociatedControlID="Password"
                                   Text="Password:" />
                               <asp:TextBox ID="Password" runat="server" TextMode="Password"
                                   BorderColor="DarkGray" BorderStyle="Inset" BorderWidth="2px" />
                               <asp:RequiredFieldValidator ID="valRequirePassword" runat="server"
                                   ControlToValidate="Password" SetFocusOnError="True" Text="*"
                                   ValidationGroup="Login" />
&nbsp;<asp:Button CssClass="blackButton2"  validationgroup="Login" CommandName="Login"
                                        ID="Submit" runat="server" Text="Login" Font-Bold="True" />
                              </td>
                           
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me"
                              ForeColor="DarkSlateGray"></asp:CheckBox>&nbsp;|&nbsp;<asp:HyperLink ID="lnkPasswordRecovery" runat="server" NavigateUrl="~/PasswordRecovery.aspx">Forgot
                                password?</asp:HyperLink>
                            </td>
                           
                        </tr>
                     </table>
                  </LayoutTemplate>
               </asp:Login>
            </AnonymousTemplate>
           
            <LoggedInTemplate>
               <div id="welcomebox">
                  <asp:LoginName ID="LoginName1" runat="server" FormatString="Hello      {0}" /><br />
                  <small>
                  <asp:HyperLink ID="lnkProfile" runat="server" Text="Edit Profile" NavigateUrl="~/EditProfile.aspx" /><br />
                  <asp:LoginStatus ID="LoginStatus1" Runat="server" />
                  </small>
               </div>
            </LoggedInTemplate>
         </asp:LoginView>
        </div>

     
     
Avatar of lotusnotesnewbie
lotusnotesnewbie
Flag of India image

Could you use a button image instead of  a button and change the Login status control like <asp:LoginStatus ID="LoginStatus1" runat="server" LoginImageUrl="~/images/<button image>.gif" />
ASKER CERTIFIED SOLUTION
Avatar of jacksonm1234
jacksonm1234
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mathieu_cupryk

ASKER

lotus if you try to login to omegalove.com
with mathieu and password cupryk
u will see the button not working well.
<asp:LoginStatus ID="LoginStatus1" Runat="server" CssClass="blackButton2" Font-Bold />
                 
Can you give me a hand.
Did you have any questions on my solution? I thought I gave you the answer you were looking for but maybe not...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
jack and lotus it is still not working.
Any help would be great
try username accopaper
password omegalove
it is still not the right size I would like to put the font color to white instead of having orange and red.
any answers?
Did you try my solution?  
actual I had to use a button.
Was just back will look into it and let you know before today
let me know if this helps

<asp:LoginStatus ID="LoginStatus1" runat="server" LoginImageUrl="~/images/login.png" LogoutImageUrl="~/images/logout.png"/>  - No CSS required. Just two button like images.
I already implement go to omegalove.com
type username: macupryk
password: cupryk
:) pardon me
no worries.