Torna al Thread
Protected Sub DScerca_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles DScerca.Selecting
'query di "DScerca": SELECT * FROM [fumetti] WHERE (([settore] = @settore) AND ([tipo] = @tipo) AND ([titolo] LIKE '%' + @titolo + '%') OR([descrizione] LIKE '%' + @descrizione + '%')) ORDER BY [datadicreazione] DESC
If Val(DDcategorie.SelectedValue) > 1 And Val(DDcategorie.SelectedValue) < 19 Then ' tipo=IRONICO
e.Command.Parameters("@settore").Value = DDcategorie.SelectedItem.ToString
e.Command.Parameters("@tipo").Value = "Ironico"
e.Command.Parameters("@titolo").Value = Trim(txtcerca.Text)
e.Command.Parameters("@descrizione").Value = Trim(txtcerca.Text)
End If
End Sub