mathieu_cupryk
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/PlainH tml/Defaul t.css" rel="stylesheet"
type="text/css" />
<div id="loginbox">
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:Login ID="Login" runat="server"
DestinationPageUrl="~/Prof ile.aspx" FailureAction="RedirectToL oginPage"
Height="31px">
<LayoutTemplate>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:Label runat="server" ID="lblUserName" AssociatedControlID="UserN ame" Text="Username:" />
<asp:TextBox id="UserName" runat="server" BorderColor="DarkGray"
BorderStyle="Inset" BorderWidth="2px" />
<asp:RequiredFieldValidato r ID="valRequireUserName" runat="server" SetFocusOnError="True"
ControlToValidate="UserNam e" Text="*" ValidationGroup="Login" />
<asp:Label ID="lblPassword" runat="server" AssociatedControlID="Passw ord"
Text="Password:" />
<asp:TextBox ID="Password" runat="server" TextMode="Password"
BorderColor="DarkGray" BorderStyle="Inset" BorderWidth="2px" />
<asp:RequiredFieldValidato r ID="valRequirePassword" runat="server"
ControlToValidate="Passwor d" SetFocusOnError="True" Text="*"
ValidationGroup="Login" />
<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:Chec kBox>  ;| <a sp:HyperLi nk ID="lnkPasswordRecovery" runat="server" NavigateUrl="~/PasswordRec overy.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>
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/PlainH
type="text/css" />
<div id="loginbox">
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:Login ID="Login" runat="server"
DestinationPageUrl="~/Prof
Height="31px">
<LayoutTemplate>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:Label runat="server" ID="lblUserName" AssociatedControlID="UserN
<asp:TextBox id="UserName" runat="server" BorderColor="DarkGray"
BorderStyle="Inset" BorderWidth="2px" />
<asp:RequiredFieldValidato
ControlToValidate="UserNam
<asp:Label ID="lblPassword" runat="server" AssociatedControlID="Passw
Text="Password:" />
<asp:TextBox ID="Password" runat="server" TextMode="Password"
BorderColor="DarkGray" BorderStyle="Inset" BorderWidth="2px" />
<asp:RequiredFieldValidato
ControlToValidate="Passwor
ValidationGroup="Login" />
<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">
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
<asp:LoginStatus ID="LoginStatus1" Runat="server" />
</small>
</div>
</LoggedInTemplate>
</asp:LoginView>
</div>
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/<b utton image>.gif" />
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
jack and lotus it is still not working.
Any help would be great
Any help would be great
ASKER
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.
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.
ASKER
any answers?
Did you try my solution?
ASKER
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/lo gin.png" LogoutImageUrl="~/images/l ogout.png" /> - No CSS required. Just two button like images.
<asp:LoginStatus ID="LoginStatus1" runat="server" LoginImageUrl="~/images/lo
ASKER
I already implement go to omegalove.com
type username: macupryk
password: cupryk
type username: macupryk
password: cupryk
:) pardon me
ASKER
no worries.