ASP.NET Validators

Discussion in 'ASP .Net' started by shapper, Jun 1, 2007.

  1. shapper

    shapper Guest

    Hello,

    Is there any way to make ASP.NET validators to display as block?
    I tried everything I could think off with skins, css, etc.

    I really don't know what else to try.
    Shouldn't this be easy?
    The objective is "only" to display the validators message in a single
    line.

    Thanks,
    Miguel
    shapper, Jun 1, 2007
    #1
    1. Advertising

  2. shapper

    Hans Kesting Guest

    > Hello,
    >
    > Is there any way to make ASP.NET validators to display as block? I
    > tried everything I could think off with skins, css, etc.
    >
    > I really don't know what else to try.
    > Shouldn't this be easy?
    > The objective is "only" to display the validators message in a single
    > line.
    > Thanks,
    > Miguel


    I don't know if you can get it into a single line, but have you tried
    the ValidationSummary?

    Also: you don't *have* to place the validator controls next to the control
    they are validating. Those validators could be anywhere on the page.
    And if you set Display to Dynamic, you won't notice them if everything is ok.

    Hans Kesting
    Hans Kesting, Jun 1, 2007
    #2
    1. Advertising

  3. shapper

    shapper Guest

    On Jun 1, 2:11 pm, Hans Kesting <> wrote:
    > > Hello,

    >
    > > Is there any way to make ASP.NET validators to display as block? I
    > > tried everything I could think off with skins, css, etc.

    >
    > > I really don't know what else to try.
    > > Shouldn't this be easy?
    > > The objective is "only" to display the validators message in a single
    > > line.
    > > Thanks,
    > > Miguel

    >
    > I don't know if you can get it into a single line, but have you tried
    > the ValidationSummary?
    >
    > Also: you don't *have* to place the validator controls next to the control
    > they are validating. Those validators could be anywhere on the page.
    > And if you set Display to Dynamic, you won't notice them if everything is ok.
    >
    > Hans Kesting


    Yes I know that.
    I have it set to dynamic and I want them to show under each textbox,
    dropdownlist, etc in my form.
    This is why i need them to display: block.

    This would be something really useful. I can't understand why the
    control does not have an option to display block instead of display
    inline.
    Such a simple feature ... I think.

    Miguel
    shapper, Jun 1, 2007
    #3
  4. shapper

    bruce barker Guest

    they render as a span, but allow you to specify the ccs class name.
    thats all you need.

    <style>
    ..blocknowrap {display:block;white-space:nowrap;}
    </style>


    -- bruce (sqlwork.com)

    shapper wrote:
    > On Jun 1, 2:11 pm, Hans Kesting <> wrote:
    >>> Hello,
    >>> Is there any way to make ASP.NET validators to display as block? I
    >>> tried everything I could think off with skins, css, etc.
    >>> I really don't know what else to try.
    >>> Shouldn't this be easy?
    >>> The objective is "only" to display the validators message in a single
    >>> line.
    >>> Thanks,
    >>> Miguel

    >> I don't know if you can get it into a single line, but have you tried
    >> the ValidationSummary?
    >>
    >> Also: you don't *have* to place the validator controls next to the control
    >> they are validating. Those validators could be anywhere on the page.
    >> And if you set Display to Dynamic, you won't notice them if everything is ok.
    >>
    >> Hans Kesting

    >
    > Yes I know that.
    > I have it set to dynamic and I want them to show under each textbox,
    > dropdownlist, etc in my form.
    > This is why i need them to display: block.
    >
    > This would be something really useful. I can't understand why the
    > control does not have an option to display block instead of display
    > inline.
    > Such a simple feature ... I think.
    >
    > Miguel
    >
    bruce barker, Jun 1, 2007
    #4
  5. shapper

    shapper Guest

    On Jun 1, 4:41 pm, bruce barker <> wrote:
    > they render as a span, but allow you to specify the ccs class name.
    > thats all you need.
    >
    > <style>
    > .blocknowrap {display:block;white-space:nowrap;}
    > </style>
    >
    > -- bruce (sqlwork.com)
    >
    > shapper wrote:
    > > On Jun 1, 2:11 pm, Hans Kesting <> wrote:
    > >>> Hello,
    > >>> Is there any way to make ASP.NET validators to display as block? I
    > >>> tried everything I could think off with skins, css, etc.
    > >>> I really don't know what else to try.
    > >>> Shouldn't this be easy?
    > >>> The objective is "only" to display the validators message in a single
    > >>> line.
    > >>> Thanks,
    > >>> Miguel
    > >> I don't know if you can get it into a single line, but have you tried
    > >> the ValidationSummary?

    >
    > >> Also: you don't *have* to place the validator controls next to the control
    > >> they are validating. Those validators could be anywhere on the page.
    > >> And if you set Display to Dynamic, you won't notice them if everything is ok.

    >
    > >> Hans Kesting

    >
    > > Yes I know that.
    > > I have it set to dynamic and I want them to show under each textbox,
    > > dropdownlist, etc in my form.
    > > This is why i need them to display: block.

    >
    > > This would be something really useful. I can't understand why the
    > > control does not have an option to display block instead of display
    > > inline.
    > > Such a simple feature ... I think.

    >
    > > Miguel


    Yes, I do know that.
    But try to apply a CssClass to it with display:block.
    It does not work. The Display: Inline generated by the JavaScript
    overrides it.
    I tried many other approaches and I always got the same problem.

    The only way I was able to make this work was to make:
    rvf.ErrorMessage = "<br />My Error Message"

    This is really annoying ...

    Miguel
    shapper, Jun 1, 2007
    #5
  6. shapper

    shapper Guest

    On Jun 1, 4:41 pm, bruce barker <> wrote:
    > they render as a span, but allow you to specify the ccs class name.
    > thats all you need.
    >
    > <style>
    > .blocknowrap {display:block;white-space:nowrap;}
    > </style>
    >
    > -- bruce (sqlwork.com)
    >
    > shapper wrote:
    > > On Jun 1, 2:11 pm, Hans Kesting <> wrote:
    > >>> Hello,
    > >>> Is there any way to make ASP.NET validators to display as block? I
    > >>> tried everything I could think off with skins, css, etc.
    > >>> I really don't know what else to try.
    > >>> Shouldn't this be easy?
    > >>> The objective is "only" to display the validators message in a single
    > >>> line.
    > >>> Thanks,
    > >>> Miguel
    > >> I don't know if you can get it into a single line, but have you tried
    > >> the ValidationSummary?

    >
    > >> Also: you don't *have* to place the validator controls next to the control
    > >> they are validating. Those validators could be anywhere on the page.
    > >> And if you set Display to Dynamic, you won't notice them if everything is ok.

    >
    > >> Hans Kesting

    >
    > > Yes I know that.
    > > I have it set to dynamic and I want them to show under each textbox,
    > > dropdownlist, etc in my form.
    > > This is why i need them to display: block.

    >
    > > This would be something really useful. I can't understand why the
    > > control does not have an option to display block instead of display
    > > inline.
    > > Such a simple feature ... I think.

    >
    > > Miguel


    That worked!

    Thank You Very Much,
    Miguel
    shapper, Jun 1, 2007
    #6
    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. Ratman
    Replies:
    0
    Views:
    643
    Ratman
    Sep 14, 2004
  2. Lars Netzel
    Replies:
    3
    Views:
    13,762
    Brock Allen
    Apr 18, 2005
  3. =?Utf-8?B?dHBlcnJp?=

    ASP.Net Validators

    =?Utf-8?B?dHBlcnJp?=, Jun 4, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    343
    Teemu Keiski
    Jun 4, 2005
  4. Papanii Okai

    Asp.net validators

    Papanii Okai, Jan 18, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    634
    Papanii Okai
    Jan 18, 2006
  5. Ben Fidge
    Replies:
    2
    Views:
    908
    Ben Fidge
    Mar 20, 2006
Loading...

Share This Page