Layout depending on simple results of a calculation

Discussion in 'ASP .Net' started by Badass Scotsman, Apr 22, 2006.

  1. Classic ASP / VBScript question, I don't have access to any classic ASP
    group, apologies.

    This may seem a bizarre question, however I would like to be able to assign
    numerical values to 5 different tables dynamically, for example:

    <table ID="1">
    <table ID="2">
    <table ID="3">
    <table ID="4">
    <table ID="5">

    And then, order them on the page in ASCENDING order, no database interaction
    here.

    I will have a page URL as follows:

    tables.asp?Table1ID=10&Table2ID=20&Table3ID=30 and so on...these parameters
    are what will determine the ordering and layout of the tables.

    Any ideas? Struggling to come up with anything here :(

    Any help greatly appreciated.

    Regards,

    Gary.
     
    Badass Scotsman, Apr 22, 2006
    #1
    1. Advertising

  2. Gary,

    Start by putting your tableids into an array:

    arrTables(4)

    arrTables(0) = Request.QueryString("Table1Id")
    arrTables(1) = Request.QueryString("Table2Id")
    ....
    arrTables(4) = Request.QueryString("Table5Id")

    Then use a for next loop to loop through them creating your tables:

    Dim TableString
    TableString = ""

    For i = 0 To UBound(arrTables)
    TableString = TableString & "<table ID=""" & arrTables(i) & """>"
    Next


    I've been using asp.net 1.0 - 2.0 since it first came out in beta 5 or so
    years ago now so my vbscript is very rusty but that's the idea.

    Good luck with it and happy programming!

    Regards,


    --
    S. Justin Gengo
    Web Developer / Programmer

    Free code library:
    http://www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche


    "Badass Scotsman" <> wrote in message
    news:e2e97q$5sg$1$...
    > Classic ASP / VBScript question, I don't have access to any classic ASP
    > group, apologies.
    >
    > This may seem a bizarre question, however I would like to be able to
    > assign numerical values to 5 different tables dynamically, for example:
    >
    > <table ID="1">
    > <table ID="2">
    > <table ID="3">
    > <table ID="4">
    > <table ID="5">
    >
    > And then, order them on the page in ASCENDING order, no database
    > interaction here.
    >
    > I will have a page URL as follows:
    >
    > tables.asp?Table1ID=10&Table2ID=20&Table3ID=30 and so on...these
    > parameters are what will determine the ordering and layout of the tables.
    >
    > Any ideas? Struggling to come up with anything here :(
    >
    > Any help greatly appreciated.
    >
    > Regards,
    >
    > Gary.
    >
    >
    >
     
    S. Justin Gengo, Apr 24, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeremy
    Replies:
    1
    Views:
    365
    Jim White
    Feb 18, 2004
  2. Replies:
    1
    Views:
    586
    John Timney \(MVP\)
    Jun 19, 2006
  3. Vedran

    Presenting calculation results

    Vedran, Sep 10, 2008, in forum: Python
    Replies:
    1
    Views:
    295
    Marco Bizzarri
    Sep 10, 2008
  4. KsAdmin

    Formatting the results of a calculation

    KsAdmin, Jul 6, 2004, in forum: Javascript
    Replies:
    22
    Views:
    243
    Dr John Stockton
    Jul 7, 2004
  5. Replies:
    2
    Views:
    187
Loading...

Share This Page