473,387 Members | 1,573 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,387 software developers and data experts.

Why do CONTROLS end with an EXTRA line-break/space???

On my ASP.NET pages, it seems that _after_ any web or user control - an
extra (small) line break or space is inserted automatically right after the
Control. This is unwanted since it messes up vertical alignment preventing
me of having things "touch" each other. I have tried surrounding the
controls in a DIV tag with padding set to 0 but this still does not help.

What must I do to prevent this line-break or space to happen after a
web/user control?

Thanks in advance
Nov 15 '05 #1
3 3960
What happens if you specifiy the height of the div and hide the overflow
(CSS) i.e. style="height:100px;overflow:hidden;", assuming that your control
has a fixed height?

Greg

"michael" <mp********@sbcglobal.net> wrote in message
news:uy****************@TK2MSFTNGP11.phx.gbl...
On my ASP.NET pages, it seems that _after_ any web or user control - an
extra (small) line break or space is inserted automatically right after the Control. This is unwanted since it messes up vertical alignment preventing me of having things "touch" each other. I have tried surrounding the
controls in a DIV tag with padding set to 0 but this still does not help.

What must I do to prevent this line-break or space to happen after a
web/user control?

Thanks in advance

Nov 15 '05 #2
Are you sure you're not adding it yourself? Here's an example:

<div>
<my:control runat="server">
some stuff
</my:control>
</div>

There's a CR/LF after the control (before the end of the div) but it's not
the control that's putting it there--it's right there in the HTML. To
suppress this you would need to do

<div>
<my:control runat="server">
some stuff
</my:control></div>

"michael" <mp********@sbcglobal.net> wrote in message
news:uy****************@TK2MSFTNGP11.phx.gbl...
On my ASP.NET pages, it seems that _after_ any web or user control - an
extra (small) line break or space is inserted automatically right after the Control. This is unwanted since it messes up vertical alignment preventing me of having things "touch" each other. I have tried surrounding the
controls in a DIV tag with padding set to 0 but this still does not help.

What must I do to prevent this line-break or space to happen after a
web/user control?

Thanks in advance

Nov 15 '05 #3
No ... my code looks like this

<div>
<my:control runat="server">some stuff</my:control></div>

"Bret Mulvey [MS]" <br***@online.microsoft.com> wrote in message
news:uH****************@TK2MSFTNGP11.phx.gbl...
Are you sure you're not adding it yourself? Here's an example:

<div>
<my:control runat="server">
some stuff
</my:control>
</div>

There's a CR/LF after the control (before the end of the div) but it's not
the control that's putting it there--it's right there in the HTML. To
suppress this you would need to do

<div>
<my:control runat="server">
some stuff
</my:control></div>

"michael" <mp********@sbcglobal.net> wrote in message
news:uy****************@TK2MSFTNGP11.phx.gbl...
On my ASP.NET pages, it seems that _after_ any web or user control - an
extra (small) line break or space is inserted automatically right after

the
Control. This is unwanted since it messes up vertical alignment

preventing
me of having things "touch" each other. I have tried surrounding the
controls in a DIV tag with padding set to 0 but this still does not help.
What must I do to prevent this line-break or space to happen after a
web/user control?

Thanks in advance


Nov 15 '05 #4

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

Similar topics

6
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at...
16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
14
by: Joe | last post by:
Hello All: I am trying to dynamically populate a web page with literal content and controls (textboxes and checkboxes (and eventually two buttons - the buttons do not appear in the code yet). I...
20
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
12
by: Alan Silver | last post by:
Hello, SHORT VERSION OF THE QUESTION... What is your experience of the new ASP.NET datasource controls? Are they as good as they look, or are they another useless gimmick for doing flashy...
0
by: yeltsin27 | last post by:
I need some advice on handling dynamically added controls in a GridView. My app takes an uploaded CSV file containing addresses, converts it to a DataTable, databinds the DataTable to a...
2
by: ricky | last post by:
Can anybody help with the function to get rid of extra characters in the file. I want to remove the string from the file.So i read from input file and pass the string say "john" if found dnt write...
10
by: Neil | last post by:
Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be...
4
by: jmacduff | last post by:
I have a set of pages ( about 10 ) that all have the same controls at the top, however I am unable to put the controls the master page for the site since the other 50 pages dont have the controls....
32
by: =?Utf-8?B?U2l2?= | last post by:
I have a form that I programmatically generate some check boxes and labels on. Later on when I want to draw the form with different data I want to clear the previously created items and then put...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.