根据所选项目筛选列表框中的项目

时间:2019-04-24 08:02:53

标签: asp.net .net gridview listitem

我正在尝试创建一个列表框(多项选择),点击搜索按钮后,所有选择的值都必须按状态过滤 this is the ui, the search button is right under the listbox

这是mmy代码,用于绑定数据。基本上,我必须获取已经完成的选定值,但是我不确定如何分配它并按状态过滤

    Private Sub BindData(ByVal gvRow As GridViewRow)
    Try

        ' Environment
        Dim lstState As ListBox = DirectCast(gvRow.FindControl("lstState"), ListBox)
        '## Get searching criteria values 
        Dim sGetState As String = IIf(cbogetstate1.SelectedIndex <> 0, cbogetstate1.SelectedValue, "")


        Dim sValue As String = cbogetstate1.SelectedValue 'to get the selected value

        sValue = lstState.ToString()

    Catch ex As Exception

    End Try
End Sub

0 个答案:

没有答案