Login control FailureTextStyle ForeColor NOT SETTING

Discussion in 'ASP .Net' started by jobs, Oct 24, 2007.

  1. jobs

    jobs Guest

    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;
    }
     
    jobs, Oct 24, 2007
    #1
    1. Advertising

  2. jobs

    Patrice Guest

    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" <> a écrit dans le message de news:
    ...
    > 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;
    > }
    >
     
    Patrice, Oct 24, 2007
    #2
    1. Advertising

  3. jobs

    jobs Guest

    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="/
    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>
     
    jobs, Oct 24, 2007
    #3
  4. jobs

    Patrice Guest

    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" <> a écrit dans le message de news:
    ...
    > 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="/
    > 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>
    >
    >
     
    Patrice, Oct 24, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWF4IFdlZWJsZXI=?=

    Alternating Item Style "ForeColor" not working in Template Column

    =?Utf-8?B?TWF4IFdlZWJsZXI=?=, Oct 26, 2005, in forum: ASP .Net
    Replies:
    9
    Views:
    934
    =?Utf-8?B?TWF4IFdlZWJsZXI=?=
    Oct 27, 2005
  2. Sam
    Replies:
    2
    Views:
    406
  3. SE.Computerguy

    Setting menu properties - ForeColor

    SE.Computerguy, Sep 3, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    403
    SE.Computerguy
    Sep 10, 2007
  4. jobs
    Replies:
    0
    Views:
    523
  5. SE.Computerguy

    Setting menu properties - ForeColor

    SE.Computerguy, Sep 3, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    176
    SE.Computerguy
    Sep 10, 2007
Loading...

Share This Page