Doing Multiple Search in asp.net
hi every one,please check my below screen shot. i'm trying multiple search and it's all are static and getting data in dynamic.
Select * from TEST.dbo.sample2 where USERNAME like '%Kumar%'
OR
Select * from TEST.dbo.sample2 where USERNAME like 'Kumar%'
OR
Select * from TEST.dbo.sample2 where USERNAME like '%Kumar'
OR
Select * from TEST.dbo.sample2 where USERNAME like '%Kumar%' and password like '%AA%'
string searchQuery="SELECT * from hotelsTable where hotelName="@SearchText" and isWiFi = @WiFiCheck" and ..... "
//Add Parameters
if(chkIsWiFi.checked ==true) ..
private List<string> arrColors = new List<String>();
private List<string> arrStyles = new List<String>();
if (Request.Form["color_spice"] != null) {
arrColors.Add("spice"); }/// ## NEW CODE: NOTE CONTAINS. . 08/04/11
if (Request.Form["color_gold"] != null) { arrColors.Add("gold"); }
string sql = "select * from ado_products_fabrics where [color] in('";
sql += string.Join("','", this.arrColors.ToArray());
sql += "')";
sql += " AND [style] in('";
sql += string.Join("','", this.arrStyles.ToArray());
sql += "')";
WhereClause = sql;/