Form data - drop down values/display option

Discussion in 'ASP General' started by Tom Petersen, Sep 8, 2003.

  1. Tom Petersen

    Tom Petersen Guest

    I have a drop down box where the choices are populated from a database
    query, this part works fine:
    <option value><% = strEmail %></option>

    I was wondering if it is possible to keep the value as strEmail, but make
    the display Last_name, First_name. So when a user looks at the list, they
    will just see the names, but when the form is submitted, the actual email
    address associated with the name is passed along.

    Long story short, there is probably a better way to do what I am trying to
    do, but I was hoping for a nice simple solution to this problem! :)

    TIA
     
    Tom Petersen, Sep 8, 2003
    #1
    1. Advertising

  2. Tom Petersen

    TomB Guest

    <option value="<%=strEmail%>"><%=strLName & ", " & strFName%></option>

    "Tom Petersen" <> wrote in message
    news:...
    > I have a drop down box where the choices are populated from a database
    > query, this part works fine:
    > <option value><% = strEmail %></option>
    >
    > I was wondering if it is possible to keep the value as strEmail, but make
    > the display Last_name, First_name. So when a user looks at the list, they
    > will just see the names, but when the form is submitted, the actual email
    > address associated with the name is passed along.
    >
    > Long story short, there is probably a better way to do what I am trying to
    > do, but I was hoping for a nice simple solution to this problem! :)
    >
    > TIA
    >
    >
     
    TomB, Sep 8, 2003
    #2
    1. Advertising

  3. Tom Petersen

    Tom Petersen Guest

    Thanks!

    That is exactly what I wanted!!!

    "TomB" <> wrote in message
    news:#...
    > <option value="<%=strEmail%>"><%=strLName & ", " & strFName%></option>
    >
    > "Tom Petersen" <> wrote in message
    > news:...
    > > I have a drop down box where the choices are populated from a database
    > > query, this part works fine:
    > > <option value><% = strEmail %></option>
    > >
    > > I was wondering if it is possible to keep the value as strEmail, but

    make
    > > the display Last_name, First_name. So when a user looks at the list,

    they
    > > will just see the names, but when the form is submitted, the actual

    email
    > > address associated with the name is passed along.
    > >
    > > Long story short, there is probably a better way to do what I am trying

    to
    > > do, but I was hoping for a nice simple solution to this problem! :)
    > >
    > > TIA
    > >
    > >

    >
    >
     
    Tom Petersen, Sep 8, 2003
    #3
    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:
    815
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,069
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    544
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    315
  5. Replies:
    3
    Views:
    319
Loading...

Share This Page