Creating Variables On-The-Fly

Discussion in 'ASP General' started by John Smith, Aug 19, 2004.

  1. John Smith

    John Smith Guest

    This might be an absurd question, but is it possible to create
    variables on the fly?

    For example, if I have an array of values

    myArray(0) = "foo"
    myArray(1) = "bar"
    myArray(2) = "foobar"

    I would like to loop through the array and create variables named
    "foo", "bar", and "foobar"

    Is this possible?

    Thank you!
    John Smith, Aug 19, 2004
    #1
    1. Advertising

  2. John Smith

    dlbjr Guest

    The dictionary object does this for you.

    Key,Value concept.

    dlbjr
    Pleading sagacious indoctrination!
    dlbjr, Aug 19, 2004
    #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. Murtix Van Basten

    creating on-the-fly asp:table in the code file

    Murtix Van Basten, Jun 25, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    6,482
    Murtix Van Basten
    Jun 25, 2003
  2. LIN

    creating ASPx Pages on the FLY

    LIN, Aug 2, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    399
  3. Maziar Aflatoun

    Creating a downloadable file on the fly

    Maziar Aflatoun, Dec 22, 2003, in forum: ASP .Net
    Replies:
    9
    Views:
    444
    JDModev
    May 10, 2004
  4. Replies:
    22
    Views:
    675
    CBFalconer
    Sep 30, 2007
  5. Brian

    Fly outmenu on the fly

    Brian, Apr 8, 2005, in forum: Javascript
    Replies:
    0
    Views:
    96
    Brian
    Apr 8, 2005
Loading...

Share This Page