I'm trying to filter the datatable at runtime from data selected from dropdown listboxes and a texbox. I place the values into variables and use the variables in the filter expression. However, this does not work even though the variavbles contain the right values. See the following code.
Dim x As String = Me.ddlSearchSki ll1.SelectedVal ue
Dim y As String = Me.ddlSkillLeve l1.SelectedItem .Text
Dim w As String = Me.txtExp1.Text .ToString
Dim DataRow2 As DataRow()
DataRow2 = dt.Select("Skil lsId = ' x ' AND SkillLevel > ' y ' AND
MonthsExperienc e > ' w ' ", "Name DESC")
When I hard code the values the expression works(SEE BELOW). Any suggestions on fixing this issue?
DataRow2 = dt.Select("Skil lsId = ' 1 ' AND SkillLevel > ' 1 ' AND
MonthsExperienc e > ' 1' ", "Name DESC")
Thanks,
Wbosw
Dim x As String = Me.ddlSearchSki ll1.SelectedVal ue
Dim y As String = Me.ddlSkillLeve l1.SelectedItem .Text
Dim w As String = Me.txtExp1.Text .ToString
Dim DataRow2 As DataRow()
DataRow2 = dt.Select("Skil lsId = ' x ' AND SkillLevel > ' y ' AND
MonthsExperienc e > ' w ' ", "Name DESC")
When I hard code the values the expression works(SEE BELOW). Any suggestions on fixing this issue?
DataRow2 = dt.Select("Skil lsId = ' 1 ' AND SkillLevel > ' 1 ' AND
MonthsExperienc e > ' 1' ", "Name DESC")
Thanks,
Wbosw
Comment