SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,727
    Mentioned
    43 Post(s)
    Tagged
    0 Thread(s)

    Detect Week-day and Output HTML

    Hello.

    I'm trying to find a way to detect the current week-day and output a chunk of HTML based on what day it is.

    Some years ago I've done something similar with regular ASP but I cannot seem to dig up that old code.

    The rest of the site I'm working on is in .Net, though, so I'm sort of backed into a corner.

    Can anyone suggest to me how this can be done??

    I'm guessing there'd be an ASP switch statement in there but I'm un-sure about the getting the week-day part.

    All suggestions welcome.

    Thanks.




    Trying to fill the unforgiving minute
    with sixty seconds' worth of distance run.

    Update on Sitepoint's Migration to Discourse

  2. #2
    SitePoint Evangelist praetor's Avatar
    Join Date
    Aug 2005
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,727
    Mentioned
    43 Post(s)
    Tagged
    0 Thread(s)
    A year ago when I worked for this weird guy I wrote this little piece of ASP to detect a query string and load appropriate content based on the variable.

    Code ASP:
    <%
    Dim whichpage
    whichpage = Request.QueryString("SSI")
    Select Case whichpage
    Case "who_we_are"
    %>
    <!-- #include file="../content/1_who_we_are.ssi" -->
    <% Case "mission_statement" %>
    <!-- #include file="../content/1_mission_statement.ssi" -->
    <% Case "our_values" %>
    <!-- #include file="../content/1_our_values.ssi" -->
    <% Case "company_history" %>
    <!-- #include file="../content/1_company_history.ssi" -->
    <% Case Else %>
    <!-- #include file="../content/1_who_we_are.ssi" -->
    <%End Select%>

    Would a variation of this work in a .Net environment ??




    Trying to fill the unforgiving minute
    with sixty seconds' worth of distance run.

    Update on Sitepoint's Migration to Discourse


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •