The Microsoft validators do not add a <BR> into the page. They definitely
create <span> tags but those are hidden when Display=Dynamic and the browser
does not let them take up any space. I suspect that your ASP.NET (aspx) form
actually has those <BR> codes in between the validators or they are embedded
in your ErrorMessage string.
Please post a code snippet showing the actual validators from the aspx form
and the HTML output on the page from the same area.
--- Peter Blum
www.PeterBlum.com
Email:
PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"Prince" <an*******@discussions.microsoft.com> wrote in message
news:2e****************************@phx.gbl...
Thanks for the reply. I tried removing the ENTER
characters by backspacing until all the validation
controls were on one line. I still see the spaces. How
do I remove the ENTER characters?
Anyway, I viewed the source of the page and saw that
DHTML put <span> </span> tags around each Validation
Control and separated each with a <br>. My guess is that
all those <br> are the cause of the white spaces. Any
thoughts on that?
-- Prince
-----Original Message-----
Each time you add an ENTER character into your HTML
page, the browserinserts a little gap of around 3-5 pixels. So you would
expect that with 3ENTER characters separating your invisible validators,
there would be anoticable gap.
Remove the ENTER characters. They are there to make it
more human readablebut HTML doesn't need them as it uses <BR> tags to
create new lines.
--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"Prince" <an*******@discussions.microsoft.com> wrote in
messagenews:34****************************@phx.gbl...I have some <RequiredFieldValidator> on my page and
everything works fine except that there are lots of white spaces between the web server controls that are being
validated. I've set the Display properties for all the
controls to "Dynamic" and still I can't get rid of the
white spaces between controls. It's as if there are
bunch of <br> tags separating the controls.
For example,the "HTML" look similar to this.
Some text here.
<RadioButtonList Server Control>
<RadioButtonList Server Control>
<RadioButtonList Server Control>
<RequireFieldValidator>
<RequireFieldValidator>
<RequireFieldValidator>
Some more text here.
Address: <TextBox Server Control>
<RequireFieldValidator>
When the above "HTML" is displayed in the browser, there is a large white space between <RadioButtonList Server
Control> and the "Some more text here."
How can I remove all that space and still keep the
validation where it is? Or is this not possible. And if not, what is the work around?
thanks,
Prince
.