Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Login control FailureTextStyle ForeColor NOT SETTING

Reply
Thread Tools

Login control FailureTextStyle ForeColor NOT SETTING

 
 
jobs
Guest
Posts: n/a
 
      10-24-2007
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;
}

 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      10-24-2007
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).
--
Patrice

"jobs" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed). com...
> 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;
> }
>



 
Reply With Quote
 
 
 
 
jobs
Guest
Posts: n/a
 
      10-24-2007
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="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /
>

<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT"
value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/
wEPDwUKLTMwMzI2MjM1OQ9kFgICAw9kFgICAQ88KwAKAQAPFgI eCFVzZXJOYW1lBQVka2RrZGQWAmYPZBYEAgMPDxYCHgRUZXh0B QVka2RrZGRkAgkPEA8WAh4HQ2hlY2tlZGhkZGRkGAEFHl9fQ29 udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBRBMb2dpbiRSZ W1lbWJlck1ltLvN1+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$RecoverPasswor d&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>


 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      10-24-2007
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" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed) om...
> 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="__LASTFOCUS" id="__LASTFOCUS" value="" />
> <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /
>>

> <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT"
> value="" />
> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/
> wEPDwUKLTMwMzI2MjM1OQ9kFgICAw9kFgICAQ88KwAKAQAPFgI eCFVzZXJOYW1lBQVka2RrZGQWAmYPZBYEAgMPDxYCHgRUZXh0B QVka2RrZGRkAgkPEA8WAh4HQ2hlY2tlZGhkZGRkGAEFHl9fQ29 udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBRBMb2dpbiRSZ W1lbWJlck1ltLvN1+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$RecoverPasswor d&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>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Can't set Login.FailureTextStyle.ForeColor ? jobs ASP .Net 0 10-15-2007 07:12 PM
Setting menu properties - ForeColor SE.Computerguy ASP .Net 2 09-10-2007 07:16 PM
Setting menu properties - ForeColor SE.Computerguy ASP .Net Web Controls 2 09-10-2007 07:16 PM
ForeColor of validationSummary control Sam ASP .Net 2 03-22-2006 02:52 AM
Alternating Item Style "ForeColor" not working in Template Column =?Utf-8?B?TWF4IFdlZWJsZXI=?= ASP .Net 9 10-27-2005 06:06 PM



Advertisments