webforms - ASP.NET DropDownList OnItemDataBound -


is there method on <asp:dropdownlist> equivalent onitemdatabound on repeaters?

the reason want check each value before putting in drop down list.

nothing similar onitemdatabound give item context.there events ondatabound triggered when reaches binding.

your reason asking event enriching row instead filterout, not have helped event.

the best option solve question

the reason want check each value before putting in drop down list.

is thing following pseudo code

this.yourdropdownlist.items.clear();  var lst = new list<listitem>(); var yourcollection= <yourcollection after apply linq conditions check> foreach (var obj in yourcollection) { //loop , add    this.yourdropdownlist.items.add(new listitem {text = obj.prop1, value = obj.prop2}); }  

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -