473,785 Members | 2,482 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validation White Spaces

I have some <RequiredFieldV alidator> 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.
<RadioButtonLis t Server Control>
<RadioButtonLis t Server Control>
<RadioButtonLis t Server Control>
<RequireFieldVa lidator>
<RequireFieldVa lidator>
<RequireFieldVa lidator>

Some more text here.
Address: <TextBox Server Control>
<RequireFieldVa lidator>
When the above "HTML" is displayed in the browser, there
is a large white space between <RadioButtonLis t 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 3368
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****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Prince" <an*******@disc ussions.microso ft.com> wrote in message
news:34******** *************** *****@phx.gbl.. .
I have some <RequiredFieldV alidator> 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.
<RadioButtonLis t Server Control>
<RadioButtonLis t Server Control>
<RadioButtonLis t Server Control>
<RequireFieldVa lidator>
<RequireFieldVa lidator>
<RequireFieldVa lidator>

Some more text here.
Address: <TextBox Server Control>
<RequireFieldVa lidator>
When the above "HTML" is displayed in the browser, there
is a large white space between <RadioButtonLis t 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****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Prince" <an*******@disc ussions.microso ft.com> wrote in messagenews:34******* *************** ******@phx.gbl. ..
I have some <RequiredFieldV alidator> 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.
<RadioButtonLis t Server Control>
<RadioButtonLis t Server Control>
<RadioButtonLis t Server Control>
<RequireFieldVa lidator>
<RequireFieldVa lidator>
<RequireFieldVa lidator>

Some more text here.
Address: <TextBox Server Control>
<RequireFieldVa lidator>
When the above "HTML" is displayed in the browser, there is a large white space between <RadioButtonLis t 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****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Prince" <an*******@disc ussions.microso ft.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****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Prince" <an*******@disc ussions.microso ft.com> wrote in

message
news:34****** *************** *******@phx.gbl ...
I have some <RequiredFieldV alidator> 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.
<RadioButtonLis t Server Control>
<RadioButtonLis t Server Control>
<RadioButtonLis t Server Control>
<RequireFieldVa lidator>
<RequireFieldVa lidator>
<RequireFieldVa lidator>

Some more text here.
Address: <TextBox Server Control>
<RequireFieldVa lidator>
When the above "HTML" is displayed in the browser, there is a large white space between <RadioButtonLis t 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
3328
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, from_stack, cards ) must be reduced to: .. . max_move and AC_RowStack.acceptsCards(self,from_stack,cards) My solution has been (wrogly): ''.join(source_line.split())
2
2800
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> </xsd:simpleType> </xsd:element> It can validate XML text like: <Identifier>abbbb</Identifier>
11
15019
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 spaces(if it more than once between two words). Is there any function we have in C which will find out the tabs and white spaces and returns the text in the follwong way -
4
3599
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. See http://www.unics.uni-hannover.de/nhtcapri/temp/white-space.html for a cumulative effect. Why is this important? Instead of "span", think of the "rp" element
2
28095
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 coding...but it works....any pointers to improve the code. sid = document.form1.StudentID.value; if (sid.length == 0 || sid == " " || sid ==" " || sid ==" " || sid ==" ") {
12
7224
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 spaces, those are the spaces between the words. But most of what is in the fields has been cut-n-pasted from online forms, and the results can be VERY spread out. I could probably save 80% of the space if I could get rid of the extra white space....
3
1696
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. It works quite nicely and I like the way it works. The problem is I am working on a site where the html needs to validate using STRICT. This form doesn't validate with STRICT because I use a name on the form and not and id. Could someone show me...
1
1188
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 username is a combination. the only check i am doing is if there are any white spaces and if a user simple presses the space bar and does not enter value i display a message to enter the reference number and even if there are white spaces followed...
1
310
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 username is a combination. the only check i am doing is if there are any white spaces and if a user simple presses the space bar and does not enter value i
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10090
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9949
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.