Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
<asp:Label id="label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "firstName") %></asp:Label>
because eval trims the blank spaces!!
Regards
Raghul
Posted
Updated 6-Feb-10 7:19am
v2

1 solution

The issue you Html only displays one space, no matter how many you put in. If you want to display more than one space, you need to use a none-breaking space which, cunningly enough, HTML provides through the medium of &nbsp;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900