Is it possible to have a non-breaking space in a label?
Printable View
Is it possible to have a non-breaking space in a label?
No. It's plain text. You should be able to get what you want out of a read-only RichTextBox though.
Actually you can, just cast 160 to a char value. translates to a char value of 160 I believe. Why do you want that though?
edit:
It might be but doesn't stay that as plain text after it's viewed on a webpage though, so it's still translated to something. That's just an encoding...
Drat, wrong again! I can see a need for it if you're using a fixed size label and varying text though.
I don't know too much about it, I found the char code via the HttpUtility class from the System.Web namespace though. It seems to stick too when using it in the Text property of a label. There's no weird trimming of that Chr(160) back to a regular space or anything odd like that. Don't blame me for making sure of things lol.