By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,564 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

ASP.NET Validators

P: n/a
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

Jun 1 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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
Jun 1 '07 #2

P: n/a
On Jun 1, 2:11 pm, Hans Kesting <news.2.han...@spamgourmet.comwrote:
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

Jun 1 '07 #3

P: n/a
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 <news.2.han...@spamgourmet.comwrote:
>>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
Jun 1 '07 #4

P: n/a
On Jun 1, 4:41 pm, bruce barker <nos...@nospam.comwrote:
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 <news.2.han...@spamgourmet.comwrote:
>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

Jun 1 '07 #5

P: n/a
On Jun 1, 4:41 pm, bruce barker <nos...@nospam.comwrote:
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 <news.2.han...@spamgourmet.comwrote:
>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

Jun 1 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.