Replacing the Value of a particular Dropdownlist Item

Discussion in 'ASP .Net' started by Jason, Dec 13, 2007.

  1. Jason

    Jason Guest

    The following code removes a particular item from my drop down.

    Instead, I would like to replace it's value with another string. How
    can I do that in vb.net?

    Dim ddl = CType(FormMaint.FindControl("OfferCodesDropDown"),
    DropDownList)
    If sender.selectedvalue < 10 Then
    ddl.Items.Remove(ddl.Items.FindByValue("BUY NOW"))
    Else
    '???
    End If

    Thanks.
     
    Jason, Dec 13, 2007
    #1
    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. Bryan Poteet
    Replies:
    0
    Views:
    408
    Bryan Poteet
    Dec 4, 2003
  2. Bart
    Replies:
    4
    Views:
    358
  3. Replies:
    1
    Views:
    390
    David Wier
    Mar 24, 2008
  4. QUASAR
    Replies:
    6
    Views:
    461
    QUASAR
    Jan 17, 2004
  5. Rob Meade

    Replacing - and not Replacing...

    Rob Meade, Apr 5, 2005, in forum: ASP General
    Replies:
    5
    Views:
    316
    Chris Hohmann
    Apr 11, 2005
Loading...

Share This Page