drop-down menus and asp

Discussion in 'ASP .Net' started by vindictive27, Mar 3, 2008.

  1. vindictive27

    vindictive27 Guest

    Is there a way to create a drop-down menu, that will import its items
    from a text file? The idea being, that rather than going into the
    code and manually updating the drop-down menu properties each time,
    the text file can just be replaced and the next time the page is
    loaded, the new items will appear correctly?
     
    vindictive27, Mar 3, 2008
    #1
    1. Advertising

  2. vindictive27

    Mike Guest

    Why not use a database table and update that when a new selection is added?

    "vindictive27" <> wrote in message
    news:...
    > Is there a way to create a drop-down menu, that will import its items
    > from a text file? The idea being, that rather than going into the
    > code and manually updating the drop-down menu properties each time,
    > the text file can just be replaced and the next time the page is
    > loaded, the new items will appear correctly?
     
    Mike, Mar 3, 2008
    #2
    1. Advertising

  3. "vindictive27" <> wrote in message
    news:...

    > Is there a way to create a drop-down menu, that will import its items
    > from a text file? The idea being, that rather than going into the
    > code and manually updating the drop-down menu properties each time,
    > the text file can just be replaced and the next time the page is
    > loaded, the new items will appear correctly?


    Simple answer is yes.

    If the text file is structured to resemble a datatable, you can interface
    with it using OleDb:
    http://www.connectionstrings.com/?carrier=textfile

    Alternatively, an XML document is just a text file structured in a
    particular way, so you could go down that route...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Mar 3, 2008
    #3
  4. The XML approach works well.

    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "vindictive27" <> wrote in message
    > news:...
    >
    >> Is there a way to create a drop-down menu, that will import its items
    >> from a text file? The idea being, that rather than going into the
    >> code and manually updating the drop-down menu properties each time,
    >> the text file can just be replaced and the next time the page is
    >> loaded, the new items will appear correctly?

    >
    > Simple answer is yes.
    >
    > If the text file is structured to resemble a datatable, you can interface
    > with it using OleDb:
    > http://www.connectionstrings.com/?carrier=textfile
    >
    > Alternatively, an XML document is just a text file structured in a
    > particular way, so you could go down that route...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    randy.buchholz, Mar 3, 2008
    #4
    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. SirPoonga
    Replies:
    2
    Views:
    792
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,040
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    507
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    288
  5. Replies:
    3
    Views:
    304
Loading...

Share This Page