Results 1 to 2 of 2

Thread: drop down

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    drop down

    Webform2 retrieves an id of a record in a table of a database.
    Let's say the id = 3
    webform 2 has already got a drop down list of countries populated.
    Now the record with id=3 has an id for the country (countryid=10)
    How can the drop down list to show the item which as id of 10?
    Thanks

    I am populating the country drop down first by using:
    With ddlStatus
    .DataSource = oDR
    .DataTextField = "country"
    .DataValueField = "countryID"
    .DataBind()
    End With

    the when I get the main record id, I would like to use something like:
    ddlcountry.selectedtext= "netherlad" --> which has countryid=10

  2. #2
    Hyperactive Member tailz's Avatar
    Join Date
    Jul 2002
    Posts
    306

    Re: drop down

    Code:
    ddlStatus.SelectedItem = ddlStatus.Items.FindByValue("10")
    I think.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width