PC Review


Reply
Thread Tools Rate Thread

Can't set Login.FailureTextStyle.ForeColor ?

 
 
jobs
Guest
Posts: n/a
 
      15th Oct 2007
This code works at setting my login failure message, but does not set
the color for some reason.

Protected Overrides Sub OnLoad(ByVal e As EventArgs)
If IsPostBack Then
If Login.FailureText <> "" Then
Login.FailureTextStyle.ForeColor = Drawing.Color.Red
Login.FailureText = "Unsuccessful Login. Try Again"
End If

End If
End Sub


I've tried setting the color and the text in the control's
properties , and there neither work.


<asp:Login ID="Login" runat="server"
DestinationPageUrl="~/Main/Default.aspx"
Style="margin-left: 30%; margin-top: 35%"
InstructionText="Login Unsuccessful. Try Again"
>

<LayoutTemplate>
<div style="position:relative;left:50px;width:
300px" >
<asp:Label ID="UserNameLabel"
SkinID="Retailer" runat="server" AssociatedControlID="UserName">User
Name:</asp:Label>
<br />
<asp:TextBox ID="UserName" width="150px"
SkinID="Retailer" runat="server"></asp:TextBox>
<br />
<asp:Label ID="PasswordLabel"
skinid="Retailer" runat="server"
AssociatedControlID="Password">Password:</asp:Label>
<br />
<asp:TextBox ID="Password" width="150px"
skinid="Retailer" runat="server" TextMode="Password"></asp:TextBox>
<br />
<asp:CheckBox ID="RememberMe"
skinid="Retailer" runat="server" Text="Remember me next time." />
<br />
<asp:Button ID="LoginButton" skinid="Retailer"
runat="server" CommandName="Login" Text="Log In"
ValidationGroup="Login" />
<asp:Button ID="RecoverPassword"
skinid="Retailer" runat="server" Text="Recover Password"
PostBackUrl="RecoverPass.aspx"/>
<br />
<asp:Literal ID="FailureText" runat="server"
EnableViewState="False"></asp:Literal>
</div>
</LayoutTemplate>
</asp:Login>


Thanks for any help or information.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ForeColor Joe Microsoft Access VBA Modules 2 11th Jul 2009 12:04 AM
ForeColor Help March Microsoft Access 1 6th Mar 2009 11:58 PM
Login control FailureTextStyle ForeColor NOT SETTING jobs Microsoft ASP .NET 3 24th Oct 2007 01:33 PM
Datasheet forecolor Tom Microsoft Access Form Coding 2 25th Nov 2006 05:31 PM
What is ForeColor For?? **Developer** Microsoft VB .NET 5 7th Aug 2005 01:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:54 AM.