User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 332,773 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,823 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Apr 9th, 2005
Views: 3,203
Learn how to loop anything you want sertain number of times. In this
example im gonna show you a simple next and loop that changes the font
size.
Last edited : Oct 29th, 2006.
asp Syntax | 2 stars
  1. <%
  2. ' Define the variables you are going to use
  3. Dim LoopCount
  4.  
  5. 'Start the for next loop
  6. For LoopCount = 1 to 5
  7.  
  8. 'If you wanted to count from 5 down to 1
  9. 'it would look like this...
  10. 'For LoopCount = 5 to 1 step -1
  11.  
  12. 'Use the LoopCount value how you desire
  13. 'In this case it's used to change the font size
  14. %>
  15.  
  16. <font size=<%=LoopCount%>>Text</font><br><br>
  17.  
  18. <%
  19. 'Repeat your loop
  20. Next
  21. %>
Post Comment

Only community members can submit or comment on code snippets. You must register or log in to contribute.

DaniWeb Marketplace (Sponsored Links)
All times are GMT -4. The time now is 9:25 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC