Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 5th, 2007, 12:59 PM
Authorized User
 
Join Date: Jan 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default calendar month links

i am attempting to create an html link that will go to the correct month's callendar of events page. i dont really know what i am doing or where the code should go in the page. below is what i am working with at the moment (doesnt work, of course)...

<%
var_date=month()
If var_date=1 Then
response.Redirect("CalendarOfEvents/January.asp")
If var_date=2 Then
response.Redirect("CalendarOfEvents/February.asp")
If var_date=3 Then
response.Redirect("CalendarOfEvents/March.asp") //and so on
End If
%>

New to this planet
__________________
New to this planet
 
Old March 5th, 2007, 01:35 PM
Authorized User
 
Join Date: Jan 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well i think i have figured it out. if anyone knows of a more better way to write this, please post. otherwise, thanks!

<%
DIM iMonth
iMonth = Month(now)

If iMonth=1 Then
response.Redirect("January.asp")
End If
If iMonth=2 Then
response.Redirect("February.asp")
End If
If iMonth=3 Then
response.Redirect("March.asp")
End If
If var_date=4 Then
response.Redirect("April.asp")
End If
If var_date=5 Then
response.Redirect("May.asp")
End If
If iMonth=6 Then
response.Redirect("June.asp")
End If
If iMonth=7 Then
response.Redirect("July.asp")
End If
If var_date=8 Then
response.Redirect("August.asp")
End If
If var_date=9 Then
response.Redirect("September.asp")
End If
If iMonth=10 Then
response.Redirect("October.asp")
End If
If iMonth=11 Then
response.Redirect("November.asp")
End If
If var_date=12 Then
response.Redirect("December.asp")
End If
%>

New to this planet





Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.Net Month Calendar ClydeV VB.NET 2002/2003 Basics 7 August 2nd, 2007 08:21 AM
month calendar bschleusner C# 2005 0 April 13th, 2007 09:46 PM
query Current Month, Month+1, Month+2, Month+3 anterior Access 2 September 24th, 2006 08:25 PM
Calendar) Move to the Selected Date's Month Page AbrarNazeer ASP.NET 2.0 Professional 1 August 15th, 2006 07:36 AM
Calendar Display Month rodmcleay ASP.NET 1.0 and 1.1 Professional 1 August 9th, 2004 11:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.