Replacing the Value of a particular Dropdownlist Item

J

Jason

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top