473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Validation White Spaces

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
Nov 18 '05 #1
3 3343
Each time you add an ENTER character into your HTML page, the browser
inserts a little gap of around 3-5 pixels. So you would expect that with 3
ENTER characters separating your invisible validators, there would be a
noticable gap.

Remove the ENTER characters. They are there to make it more human readable
but 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 message
news: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

Nov 18 '05 #2
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

.

Nov 18 '05 #3
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 browser
inserts a little gap of around 3-5 pixels. So you would

expect that with 3
ENTER characters separating your invisible validators,

there would be a
noticable gap.

Remove the ENTER characters. They are there to make it

more human readable
but 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

message
news: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

.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: qwweeeit | last post by:
Hi all, I need to limit as much as possible the lenght of a source line, stripping white spaces (except indentation). For example: .. . max_move and AC_RowStack.acceptsCards ( self,...
2
by: linkspeed | last post by:
Hi, I tried following element definition in MSXML 4.0 <xsd:element name="Identifier"> <xsd:simpleType> <xsd:restriction base="xsd:token"> <xsd:pattern value=".*"/> </xsd:restriction>...
11
by: gopal srinivasan | last post by:
Hi, I have a text like this - "This is a message containing tabs and white spaces" Now this text contains tabs and white spaces. I want remove the tabs and white...
4
by: Andreas Prilop | last post by:
How many spaces should be displayed in A <span style="display:none">x</span> B between "A" and "B"? I notice that Mozilla displays one space and Internet Explorer (5 & 6) displays two spaces....
2
by: krismath | last post by:
I am unable to have the "null" value working for the validation of the text field. The code is able to validate if the sid value is having one,two,three spaces....but not more..it is sloppy...
12
by: JA | last post by:
Is there a way to remove all the white space in the fields? I have been using Find-and-replace - looking for 2 or 3 or 4 or 10 spaces and replacing them with none. I don't want to replace single...
3
by: bdbeames | last post by:
Ok I have a form validation problem that I need one of you javascript ninja s to help me with. The following is a form with the javascript that I have used for the last year or two to validate. ...
1
by: runway27 | last post by:
i need to validate a field in a form where a user enters a reference number this can be letters, numbers and special characters also so i have not written any special preg match as the...
1
by: Sudhakar | last post by:
i need to validate a field in a form where a user enters a reference number this can be letters, numbers and special characters also so i have not written any special preg match as the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.