ForeColor of validationSummary control

Discussion in 'ASP .Net' started by Sam, Mar 22, 2006.

  1. Sam

    Sam Guest

    Hi guys,

    Is it possible to update this property programatically? would someone please
    give me a hand? The message I got back when I run one of my web pages is:
    Parser error "<%errorColor%>" is not a valid value for int32.

    Here is what I have:

    Public headerColor as string = "00FFFF"
    Public errorColor as String = "FFCC00"

    <TD vAlign ="top" bgColor="<%=headerColor%>">

    <asp:ValidationSummary id="ValidationSummary1" runat="server"
    ForeColor="<%errorColor%>" Width="646px">


    Also the headerColor and errorColor are programatically set by my program.
    Thank you



    Regards,

    Sa,
    Sam, Mar 22, 2006
    #1
    1. Advertising

  2. Sam

    David Guest

    Could you put something like this in the page_load event?
    ValidationSummary1.BackColor = ColorTranslator.FromHtml(errorColor)
    David, Mar 22, 2006
    #2
    1. Advertising

  3. Sam

    Sam Guest

    David,

    It works, this is what I'm looking for. Thanks so lots

    Regards,

    Sam

    "David" <> wrote in message
    news:...
    > Could you put something like this in the page_load event?
    > ValidationSummary1.BackColor = ColorTranslator.FromHtml(errorColor)
    >
    Sam, Mar 22, 2006
    #3
    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. Eitan
    Replies:
    0
    Views:
    461
    Eitan
    Dec 16, 2003
  2. =?Utf-8?B?U3VuaWwgU2FiaXI=?=

    ValidationSummary Control

    =?Utf-8?B?U3VuaWwgU2FiaXI=?=, Jun 16, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    450
    =?Utf-8?B?U3VuaWwgU2FiaXI=?=
    Jun 16, 2004
  3. NuB

    validationSummary control

    NuB, Dec 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    375
  4. Uriah Piddle

    ValidationSummary ForeColor Prop

    Uriah Piddle, Jul 27, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    499
    Uriah Piddle
    Jul 27, 2007
  5. jobs
    Replies:
    3
    Views:
    491
    Patrice
    Oct 24, 2007
Loading...

Share This Page