Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Sep 29, 1999

Generate Numbers at the Server End

Question:
How do I generate numbers at the server end? I have an application in which I am accessing data from an Access database and I want to define each record fetched in a separate
class. I don't know how many records can be in the table, so I would have to generate the "id" parameter of the
tag automatically.

Answer:

Use a counter and as you walk through the recordset, increment it.

i = 0
Do while not RS.EOF
  i = i+1
  response.write "
div text
RS.Movenext Loop
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap