Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 22nd, 2004, 01:38 AM
Authorized User
 
Join Date: Jun 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default whitespace in label

My problem is different. WE have a label control, we will have to assign some value with leading blank spaces in it. But this doesn't work

for eg:
LabelMessage.Text = " This is Testing Space";

Will not show the Spaces in my aspx screen. Any idea about how??


Warm Regards From,
Twinkle
************************************************** *******************
I don't know the key to success, but the key to failure is trying to please everybody.
************************************************** *******************
__________________
Warm Regards From,
Twinkle
************************************************** *******************
I don\'t know the key to success, but the key to failure is trying to please everybody.
************************************************** *******************
 
Old July 22nd, 2004, 07:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Try LabelMessage.Text = "        & nbsp;   Hi";

 
Old July 24th, 2004, 03:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

May be you can use its properties to set a fixed width and set its text right aligned, than adding leading spaces.

LabelMessage.Width = 300 'or more
LabelMessage.TextAlign = "Right"

Not sure about the exact name of those properties, you can check that.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 28th, 2004, 07:11 AM
Authorized User
 
Join Date: Jun 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi stu9820,

do you mean that on blank space could be replaced with one " " ???



Warm Regards From,
Twinkle
************************************************** *******************
I don't know the key to success, but the key to failure is trying to please everybody.
************************************************** *******************
 
Old July 28th, 2004, 07:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Yes, one " " equals one blank space.






Similar Threads
Thread Thread Starter Forum Replies Last Post
separate a string with whitespace petergoodman XSLT 8 July 8th, 2008 01:56 AM
whitespace & querystring MArk_dB Classic ASP Basics 2 May 13th, 2007 03:36 AM
In IE6 How do you get Whitespace??? David P. Manning CSS Cascading Style Sheets 0 April 24th, 2007 08:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.