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

How can I dispaly Spaces in expression part of <%= expression %> ASP directive

9
I have the following code

Expand|Select|Wrap|Line Numbers
  1. <%
  2.     if i = 0 then
  3.     pindnt = string(level*2," ")
  4.  %>
  5.      <td><% = pindnt &  recs(i) %></td>
Using string(level*2," ") I am calculating the number of Spaces I want to display before recs(i) value. But I am not getting the spaces displayed before recs(i) value.

If I change the space character in string(level*2," ") to dot (i.e, ".") then the expression is string(level*2,".") and with this change I am able to see dot's before recs(i) value based on level value I pass.

ex:suppose recs(i) = 5000
level output
0 5000
1 ..5000
2 ....5000
3 ......5000

I need space to be displayed instead of dots. Can anyone help me to figure out the problem with my code.
Jan 28 '08 #1
2 882
r035198x
13,262 8TB
I have the following code

Expand|Select|Wrap|Line Numbers
  1. <%
  2.     if i = 0 then
  3.     pindnt = string(level*2," ")
  4.  %>
  5.      <td><% = pindnt &  recs(i) %></td>
Using string(level*2," ") I am calculating the number of Spaces I want to display before recs(i) value. But I am not getting the spaces displayed before recs(i) value.

If I change the space character in string(level*2," ") to dot (i.e, ".") then the expression is string(level*2,".") and with this change I am able to see dot's before recs(i) value based on level value I pass.

ex:suppose recs(i) = 5000
level output
0 5000
1 ..5000
2 ....5000
3 ......5000

I need space to be displayed instead of dots. Can anyone help me to figure out the problem with my code.
Please make sure you are posting in the correct forum next time.


Moved to ASP forum.
Jan 28 '08 #2
CroCrew
564 Expert 512MB
Did you try:


Expand|Select|Wrap|Line Numbers
  1. <%
  2.      if i = 0 then
  3.      pindnt = string(level*2,"&nbsp;")
  4. %>
  5. <td><%response.write(pindnt &  recs(i))%></td>
  6.  
  7.  
Jan 28 '08 #3

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

Similar topics

9
by: bill | last post by:
Forget the exact definition of difference between, #include <foo.h> and #include "bar.h" Normally foo.h is a standard header file, so it's path is not defined in compiler option, but I...
8
by: Tom | last post by:
Hi I have an aspx page which has javascript to configure xmldata. I added breakpoint to the button method. When I click submit button, it did not go to those breakpoint and show the following...
3
by: FunkHouse9 | last post by:
I'm working on a form to collect data in a textarea which and am trying to keep returns and spaces. I have a couple of functions that I Frankensteined together to replace returns with <br> and to...
1
by: leninv | last post by:
I have the following code <% if i = 0 then pindnt = string(level*2," ") %> <td><% = pindnt & recs(i) %></td>
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.