![]() |
| ||
| Do while Loop to display a choosen month and the dates in it Here is my code. As always I don't understand what beginning asp 3.0 . The book says to do this code, but doesn't explain what vartodaymonth means or varTodayDate = day(now()) means. I am suppose to make two files one html file and in it have the months of the year and only one month should be passed on to the asp page. Not sure how to do that? In that page all of the days of the month I choose should be displayed Like this The days of ____ are 1 The days of ____ are 2 etc. In that blank should be the month I chose to use. Here is all I can come up with using the book beginning active server pages 3.0 p 195 if you know this book. <html> <head> <title>Example Do While</title> </head> <body> <H1>This is the days of January</H1> <% varRowCount = 1 varTodayDate = day(now()) varTodayMonth = MonthName(month(date()) Response.Write "<h2>Report for " & varTodayMonth & "</h2>" Do While varMonthCount <32 or <= 31 Response.Write "The days of " & varTodayMonth & " " & varRowCount Response.Write ": are varTodayDate<br>" varRowCount = varRowCount + 1 Loop %> </body> </html> The book says this will display if requested on the ninth of september. How do I get it to display the month of January and say The days of January are 1 The days of Januray are 2 and so on If anyone knows of another book that explains asp code to a beginner with examples please let me know |
| ||
| Re: Do while Loop to display a choosen month and the dates in it The problem is here: You have: <% It should be: <% |
| ||
| Re: Do while Loop to display a choosen month and the dates in it Or you can make it a bit more dynamic by allowing the user to select the month and then display the days in that month, as below: <form> |
| ||
| Re: Do while Loop to display a choosen month and the dates in it [QUOTE=Lafinboy]Or you can make it a bit more dynamic by allowing the user to select the month and then display the days in that month, as below: Thanks so much you have been so much help to me. YOUR GREAT! |
| All times are GMT -4. The time now is 2:19 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC