Random Server Side Includes

Discussion in 'ASP General' started by Microsoft News, Sep 17, 2003.

  1. Hi all,
    What I would like to do is randomize which file gets used with as a server
    side include. Here is what I have so far:
    <%
    Const Max_Number_Of_Includes = 6
    Randomize
    Dim intRandomNumber, strIncludeArray(10)
    strIncludeArray(0) = "includefile_1.shtm"
    strIncludeArray(1) = "includefile_2.shtm"
    strIncludeArray(2) = "icludefile_3.shtm"
    strIncludeArray(3) = "icludefile_4.shtm"
    strIncludeArray(4) = "icludefile_5.shtm"
    strIncludeArray(5) = "icludefile_6.shtm"
    intRandomNumber = Int((Max_Number_Of_Includes * Rnd))
    <!--#include file= strIncludeArray(intRandomNumber) -->
    %>

    The last line is where I am confused.
    Any help would be appreciated.

    Regards,
    Steve Karnath
     
    Microsoft News, Sep 17, 2003
    #1
    1. Advertisements

  2. Microsoft News

    dlbjr Guest

    FEEL THE WIND!

    -dlbjr

    Discerning resolutions for the alms
     
    dlbjr, Sep 17, 2003
    #2
    1. Advertisements

  3. Microsoft News

    n/a Guest

    come on, what in the world is this??????????????
     
    n/a, Sep 18, 2003
    #3
  4. http://aspfaq.com/2042
     
    Chris Hohmann, Sep 18, 2003
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.