MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Replacing the Value of a particular Dropdownlist Item

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ASPNet
Author Message
Jason



Joined: 12 Dec 2007
Posts: 5

PostPosted: Thu Dec 13, 2007 8:55 am    Post subject: Replacing the Value of a particular Dropdownlist Item Reply with quote

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.

Archived from group: microsoft>public>dotnet>framework>aspnet
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Dropdownlist performance I have an asp.net page with a dropdownlist and a datagrid with a dropdownlist in its edit mode. The dropdownlist in the datagrid loads very quick but the dropdownlist in the page take a lot of time to load. Is this normal? What is the problem? The two dro

EditItemTemplate & Dropdownlist!! Hello, I have a datagrid with lot of dropdownlists as Whenever I edit my datagrid, I want the current value of the field as the selected item in my dropdownlist. Currently whenever I edit, the drop down list is set to the first value of th

How to add a DropdownList to a DataGrid Does anyone have an example of how to add a dropdownlist to a windows datagrid? Thanks! *** Sent via Developersdex *** Don't just participate in USENET...get rewarded for it!

Bind only once (DropDownList) I have a DropDownList on my Webform. This list is bounded to DataSet which is populate from database. When load the form, list is filled and all is OK. The problem is, that the list is small (only 3 items), so I want to preserve the list by ViewState (it

Dynamic DropDownlist Hi everyone, I have one problem, but when I solve the one, another appears: I've written a loop that creates a variable number of dropdownlist controls. When I load the page, the required number of dropdowns appear on the page, but they contain the entry
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ASPNet All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group