Login control FailureTextStyle ForeColor NOT SETTING

J

jobs

This is just odd. I've removed all codebehind. The above should work,
but does not. I am using a Login LayoutTemplate. My failure message
come out in blue?? Which is my CSS default color. But I am not
instructing the use of any CSS anywhere here.



<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="Login.aspx.vb" Inherits="_Login"
Title="Americatel Retailer Login Page" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<br />
<br />
<div style="width: 500px; height: 300px; background:
url(App_Themes/Retailer/images/retaillogin.gif);margin: 0 auto;">
<asp:Login ID="Login" runat="server"
DestinationPageUrl="~/Main/Default.aspx"
Style="margin-left: 30%; margin-top: 35%"
<FailureTextStyle ForeColor="RED" />
<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>
</div>
</form>
</body>
</html>



my css:

body
{
background-color :white;
font-family:ARIAL;
color: blue;
Font-Size:10pt;
}
 
P

Patrice

For this kind of browser rendering issue your best bet is always to use
"view source" to see the rendered HTML markup rather than to look at the
server side code.

Where is your CSS fragment ? For example if in a theme the CSS file will be
automatically referenced in the rendered page (and using "view source" in
your browser would reveal this).
 
J

jobs

Thanks for response. the CSS in a .css file under my app_theme folder.

Here's the view source. No apparently style or color in the literal
error message.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="App_Themes/Retailer/Retailer.css" type="text/css"
rel="stylesheet" /><title>
Americatel Retailer Login Page
</title></head>
<body>
<form name="form1" method="post" action="login.aspx?ReturnUrl=
%2fRetailer%2fMain%2fDefault.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT"
value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/
wEPDwUKLTMwMzI2MjM1OQ9kFgICAw9kFgICAQ88KwAKAQAPFgIeCFVzZXJOYW1lBQVka2RrZGQWAmYPZBYEAgMPDxYCHgRUZXh0BQVka2RrZGRkAgkPEA8WAh4HQ2hlY2tlZGhkZGRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBRBMb2dpbiRSZW1lbWJlck1ltLvN1+57xetYdDeexvFbQnOZ0AY=" /</div>

<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</script>


<script src="/Retailer/WebResource.axd?d=BiEtBPCj-uSr6pDuF-
rV8w2&amp;t=633198421951393625" type="text/javascript"></script>


<script src="/Retailer/WebResource.axd?
d=1Bb9q1I8mpgggKieouC5Pw2&amp;t=633198421951393625" type="text/
javascript"></script>
<br />
<br />
<div style="width: 500px; height: 300px; background:
url(App_Themes/Retailer/images/retaillogin.gif);margin: 0 auto;">
<table id="Login" cellspacing="0" cellpadding="0"
border="0" style="border-collapse:collapse;margin-left: 30%; margin-
top: 35%">
<tr>
<td>
<
<div style="position:relative;left:50px;width:
300px" >
<label for="Login_UserName"
id="Login_UserNameLabel">User Name:</label>
<br />
<input name="Login$UserName" type="text"
value="dkdkd" id="Login_UserName" style="background-color:White;border-
width:1px;border-style:Inset;width:150px;" />
<br />
<label for="Login_Password"
id="Login_PasswordLabel">Password:</label>
<br />
<input name="Login$Password" type="password"
id="Login_Password" style="background-color:White;border-width:
1px;border-style:Inset;width:150px;" />
<br />
<span style="background-
color:Transparent;"><input id="Login_RememberMe" type="checkbox"
name="Login$RememberMe" /><label for="Login_RememberMe">Remember me
next time.</label></span>
<br />
<input type="submit" name="Login$LoginButton"
value="Log In" id="Login_LoginButton" style="color:White;background-
color:#0272A6;border-color:Gray;border-width:1px;border-
style:Inset;font-size:10pt;" />
<input type="submit" name="Login
$RecoverPassword" value="Recover Password"
onclick="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions(&quot;Login$RecoverPassword&quot;,
&quot;&quot;, false, &quot;&quot;, &quot;RecoverPass.aspx&quot;,
false, false))" id="Login_RecoverPassword"
style="color:White;background-color:#0272A6;border-color:Gray;border-
width:1px;border-style:Inset;font-size:10pt;" />
<br />
Your login attempt was not successful. Please
try again.
</div>
</td>
</tr>
</table>
</div>

<div>

<input type="hidden" name="__PREVIOUSPAGE" id="__PREVIOUSPAGE"
value="BvuT018k-Zi4UmWhndAO02Nki_AlMByvtTLok0BdMW81" />
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="/wEWBgKjmMmPBAKl4af/CQL
+pLH2BALY9LKMCwLG8NGxDwL6kouvAvAX9PEhfRht/NdhH/ds3Hk9EPvF" />
</div>

<script type="text/javascript">
<!--
WebForm_AutoFocus('Login');// -->
</script>
</form>
</body>
</html>
 
P

Patrice

In the view source below you can see that you have a link tag in the head
section that references your CSS file. This is automatically done for you
when a css file in your theme folder...

--
Patrice

jobs said:
Thanks for response. the CSS in a .css file under my app_theme folder.

Here's the view source. No apparently style or color in the literal
error message.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="App_Themes/Retailer/Retailer.css" type="text/css"
rel="stylesheet" /><title>
Americatel Retailer Login Page
</title></head>
<body>
<form name="form1" method="post" action="login.aspx?ReturnUrl=
%2fRetailer%2fMain%2fDefault.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT"
value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/
wEPDwUKLTMwMzI2MjM1OQ9kFgICAw9kFgICAQ88KwAKAQAPFgIeCFVzZXJOYW1lBQVka2RrZGQWAmYPZBYEAgMPDxYCHgRUZXh0BQVka2RrZGRkAgkPEA8WAh4HQ2hlY2tlZGhkZGRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBRBMb2dpbiRSZW1lbWJlck1ltLvN1+57xetYdDeexvFbQnOZ0AY="
/</div>

<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</script>


<script src="/Retailer/WebResource.axd?d=BiEtBPCj-uSr6pDuF-
rV8w2&amp;t=633198421951393625" type="text/javascript"></script>


<script src="/Retailer/WebResource.axd?
d=1Bb9q1I8mpgggKieouC5Pw2&amp;t=633198421951393625" type="text/
javascript"></script>
<br />
<br />
<div style="width: 500px; height: 300px; background:
url(App_Themes/Retailer/images/retaillogin.gif);margin: 0 auto;">
<table id="Login" cellspacing="0" cellpadding="0"
border="0" style="border-collapse:collapse;margin-left: 30%; margin-
top: 35%">
<tr>
<td>
<
<div style="position:relative;left:50px;width:
300px" >
<label for="Login_UserName"
id="Login_UserNameLabel">User Name:</label>
<br />
<input name="Login$UserName" type="text"
value="dkdkd" id="Login_UserName" style="background-color:White;border-
width:1px;border-style:Inset;width:150px;" />
<br />
<label for="Login_Password"
id="Login_PasswordLabel">Password:</label>
<br />
<input name="Login$Password" type="password"
id="Login_Password" style="background-color:White;border-width:
1px;border-style:Inset;width:150px;" />
<br />
<span style="background-
color:Transparent;"><input id="Login_RememberMe" type="checkbox"
name="Login$RememberMe" /><label for="Login_RememberMe">Remember me
next time.</label></span>
<br />
<input type="submit" name="Login$LoginButton"
value="Log In" id="Login_LoginButton" style="color:White;background-
color:#0272A6;border-color:Gray;border-width:1px;border-
style:Inset;font-size:10pt;" />
<input type="submit" name="Login
$RecoverPassword" value="Recover Password"
onclick="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions(&quot;Login$RecoverPassword&quot;,
&quot;&quot;, false, &quot;&quot;, &quot;RecoverPass.aspx&quot;,
false, false))" id="Login_RecoverPassword"
style="color:White;background-color:#0272A6;border-color:Gray;border-
width:1px;border-style:Inset;font-size:10pt;" />
<br />
Your login attempt was not successful. Please
try again.
</div>
</td>
</tr>
</table>
</div>

<div>

<input type="hidden" name="__PREVIOUSPAGE" id="__PREVIOUSPAGE"
value="BvuT018k-Zi4UmWhndAO02Nki_AlMByvtTLok0BdMW81" />
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="/wEWBgKjmMmPBAKl4af/CQL
+pLH2BALY9LKMCwLG8NGxDwL6kouvAvAX9PEhfRht/NdhH/ds3Hk9EPvF" />
</div>

<script type="text/javascript">
<!--
WebForm_AutoFocus('Login');// -->
</script>
</form>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top