A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Public Sub FindTypeEdit() Dim TypeCheckBoxListEdit As CheckBoxList = CType(FormView1.FindControl("Tabcontainer1").FindControl("TabPanel1").FindControl("TypeCheckBoxListEdit"), CheckBoxList) 'This was as a trial - hardcoded string of items -,representing possible values for the 'column "Type" . This was to ensure that checkboxList items are passed and display ok 'on CheckBoxList. 'Dim preferences As String = "Government,Non Government,International" 'Now, in my real life senario, I need to get the value of column "Type" 'and pass it as a string. This is where I fail. ObjectDataSource1.SelectParameters("Type").DefaultValue ' not working Dim preferences As String = ????? 'The rest below works perfectly well provided I get string variables in my preference string Dim li As ListItem Dim preference() As String = preferences.Split(",") 'Clear any previous setting TypeCheckBoxListEdit.SelectedIndex = -1 For Each pref As String In preference li = TypeCheckBoxListEdit.Items.FindByValue(pref) If li Is Nothing = False Then li.Selected = True End If Next End Sub