Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: integer as string value


Message #1 by "Rob v. Osnabrugge" <osnabrr@h...> on Sun, 14 Jul 2002 20:49:46
Dear ASP,

how can I make my counter variable "i" into a string variable as part of a 
listbox ?
I want to use a loop like below.

for i = 0 to 50
  response.write "<option value='" & i & "'>" & i & "</option>"
next

Thanks,Rob
Message #2 by Shaun Steckley <SSTECKLEY@P...> on Sun, 14 Jul 2002 15:44:10 -0400
for i = 0 to 50
  response.write "<option value='" & CStr(i) & "'>" & CStr(i) & "</option>"
next

But it doesn't matter (in this case) since there are no datatypes in ASP.
Your original code should work fine...

-----Original Message-----
From: Rob v. Osnabrugge [mailto:osnabrr@h...]
Sent: Sunday, July 14, 2002 4:50 PM
To: ASP Web HowTo
Subject: [asp_web_howto] integer as string value


Dear ASP,

how can I make my counter variable "i" into a string variable as part of a 
listbox ?
I want to use a loop like below.

for i = 0 to 50
  response.write "<option value='" & i & "'>" & i & "</option>"
next

Thanks,Rob

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20


The information contained in this email is confidential and is intended solely for the use of the person identified and intended as
the recipient. If you are not the intended recipient, any disclosure, copying, distribution, or taking of any action in reliance on
the contents is prohibited. If you receive this message in error, contact the sender immediately and delete it from your computer.

Message #3 by "Larry Woods" <larry@l...> on Sun, 14 Jul 2002 12:48:44 -0700
VB will convert it automatically (using "Coercion") but you can
do it yourself with CStr(i).

Larry Woods - MCSD, MCT

> -----Original Message-----
> From: Rob v. Osnabrugge [mailto:osnabrr@h...]
> Sent: Sunday, July 14, 2002 8:50 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] integer as string value
>
>
> Dear ASP,
>
> how can I make my counter variable "i" into a string
> variable as part of a
> listbox ?
> I want to use a loop like below.
>
> for i = 0 to 50
>   response.write "<option value='" & i & "'>" & i & "</option>"
> next
>
> Thanks,Rob
>
> ---
>
> Improve your web design skills with these new books
> from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=n
osim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/thepr
ogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/thepr
ogramme
r-20


  Return to Index