ASP.NET Validators

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

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
 
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
 
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
 
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)
 
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)

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
 
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)

That worked!

Thank You Very Much,
Miguel
 
Back
Top