ASP.NET Validators

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
 
H

Hans Kesting

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
 
S

shapper

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
 
B

bruce barker

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

shapper

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
 
S

shapper

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top