VB6 Combo box text property equivalent in HTML Select control

Discussion in 'ASP .Net' started by swapna.munukoti@gmail.com, Nov 13, 2007.

  1. Guest

    Hi all,

    Is there a way to display some text in html select control by default
    which when the control is clicked, will not be listed in the drop down
    that contains its options.

    For example:
    When I open a page, there is a combo box with "Select" displayed in
    that. It looks like that item is selected. But when I click that combo
    box, it does not list "Select" in the drop down. Instead it lists the
    items to be selected.

    I know that this can be achieved in vb6 using Text property of the
    combo box control.
    But is there a way to achieve the same with HTML controls?

    Hope I am clear in explaining what I want to achieve.

    Thanks,
    Swapna.
    , Nov 13, 2007
    #1
    1. Advertising

  2. In theory it is possible on client side with javascript. You need to work
    out what event(s) to handle and to manipulate the item collection
    programmatically.

    Practically, it will be difficult unless you are already experienced in this
    sort of tasks. I don't think it is worth the effort.

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    <> wrote in message
    news:...
    > Hi all,
    >
    > Is there a way to display some text in html select control by default
    > which when the control is clicked, will not be listed in the drop down
    > that contains its options.
    >
    > For example:
    > When I open a page, there is a combo box with "Select" displayed in
    > that. It looks like that item is selected. But when I click that combo
    > box, it does not list "Select" in the drop down. Instead it lists the
    > items to be selected.
    >
    > I know that this can be achieved in vb6 using Text property of the
    > combo box control.
    > But is there a way to achieve the same with HTML controls?
    >
    > Hope I am clear in explaining what I want to achieve.
    >
    > Thanks,
    > Swapna.
    >
    Eliyahu Goldin, Nov 13, 2007
    #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. dthmtlgod

    Fill Combo Box based on another Combo Box

    dthmtlgod, Nov 16, 2005, in forum: ASP General
    Replies:
    1
    Views:
    562
    Bob Barrows [MVP]
    Nov 16, 2005
  2. Mike

    Combo Box and text box

    Mike, Sep 24, 2003, in forum: Javascript
    Replies:
    2
    Views:
    138
  3. Mike

    combo box with Text box

    Mike, Sep 24, 2003, in forum: Javascript
    Replies:
    0
    Views:
    83
  4. palmiere
    Replies:
    1
    Views:
    312
    Erwin Moller
    Feb 9, 2004
  5. SM
    Replies:
    2
    Views:
    347
Loading...

Share This Page