Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Date-ASP
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Date-ASP

 Post Reply Post Reply
Author
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Topic: Date-ASP
    Posted: 26 March 2003 at 4:11pm

Is it possible to create a asp page that, based on the current month, redirects to another page?

There also has to be the possibility to select the page thru a
?MonthID=4 for April or ?MonthID=7 for July

if so, please post the code for the page here or mail it to me at chris.simon@home.nl?subject=Date-Asp

greetings chris

 



Edited by eagle00789
Using forum at Gravenrode and here and here
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2003 at 4:56pm

<%
If Request.QueryString("MonthID") > 0 THEN
Select CASE Request.QueryString("MonthID")
CASE 1
Response.Redirect("wherever/january.asp")
CASE 2
Response.Redirect("wherever/february.asp")
.....
END SELECT
ELSE
Select CASE Month(Now())
CASE 1
Response.Redirect("wherever/january.asp")
CASE 2
Response.Redirect("wherever/february.asp")
.....
END SELECT
END IF
%>
That is just in a nutshell, sure to make better.

Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2003 at 12:04am

thx. this is what i needed

greetings chris

Using forum at Gravenrode and here and here
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2003 at 8:40am

why does this doesn't work:

<%
If Request.QueryString("MonthID") > 0 THEN
Select CASE Request.QueryString("MonthID")
CASE 1
Response.Write("<!--#include file=""januari.htm"" -->")
.....
end select
end if
%>

Using forum at Gravenrode and here and here
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2003 at 10:09am
Well if you used the code as is, of course it does not work, it didi not feel like completing it, you need to repeat the cases for all month' in a year and don't use .......  if it is something else give an error message...........
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2003 at 2:23pm

i completed it of course but i need:
Response.Write("<!--#include file=""januari.htm"" -->")
to work, but it doesn't

Using forum at Gravenrode and here and here
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2003 at 3:06pm

I know it doesen't. Includes are processed before asp, cannot use them dynamically. Use Server Transfer like
CASE 3
Server.Transfer "january.htm"

but variables from page a cannont be used on page b. There are unf. lot's of limitations with that in asp....

Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2003 at 3:28pm

i don't have any variables that has to transfer between sites

this works just like i wanted it to work.

Thanks



Edited by eagle00789
Using forum at Gravenrode and here and here
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.