473,473 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Allow White Spaces between Words

90 New Member
Hi,
I am using asp.net 1.x, Here i will have to store the values in the database along with the white spaces
for eg: "My New Thread"
here I have given spaces between these words (could not be seen in the preview as it takes only one spacing between each word) but when i save them or try to display them in a Label or in a grid the spaces between them are reduced and only one space is shown between each words how to solve this?
Another question is, is that possible to have blank spaces at the end of a word for eg: "Threading " (could not be seen in the preview as it takes only one spacing between each word), if so is it possible to show as I have given in this example in the grid by databinder.Eval(Container.DataItem, "firstName")
ie:
Expand|Select|Wrap|Line Numbers
  1. <asp:Label id="label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "firstName") %></asp:Label>
because eval trims the blank spaces!!

Regards
Raghul
Feb 6 '10 #1
1 2934
Frinavale
9,735 Recognized Expert Moderator Expert
In ASP.NET all of the content displayed to the user is done so using HTML. In HTML white space is ignored....in order to print more than one space between words you have to use the HTML &nbsp; entity.

Since you are displaying data that is bound to item, you're going to have to figure out a way to get replace the spaces in the string with &nbsp; entities....sounds like fun

-Frinny
Feb 8 '10 #2

Sign in to post your reply or Sign up for a free account.

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: Malcolm Dew-Jones | last post by:
I am looking at xslt 1.0 and trying to understand if empty text nodes are supposed to be stripped or not as the default behaviour. 3.4 starts by listing rules for when white space is not stripped...
38
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with...
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...
3
by: Prince | last post by:
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...
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....
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: ApexData | last post by:
The editor eliminates spaces in my code. Is there a setting or technique for stopping this behavior. I want to be able to space out my code for cleaner reading? ' I Like This:...
0
by: gomzi | last post by:
hi, I am currently checking for white spaces in a texbox using "\s" in regex . But even when the texbox contains spaces after a word or between two words, say firstname and lastname, the regex...
8
by: KingKen | last post by:
I have created a search form for my access database. this form submits the table name, the field name and the search text. After identifying the table to search i then use this clause in my SQL...
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.