"Select ProductName ,Description,Image ,CategoryName ,IsActive from Product inner join Category on Product.CategoryId=Category.CategoryId where ProductName like'%"+SearchTextBox.Text.Replace("%", "[%]")+"%'"
string query=string.Format("Select ProductName ,Description,Image ,CategoryName ,IsActive from Product inner join Category on Product.CategoryId=Category.CategoryId where Product Name like '%{0}%'",SearchTextBox.Text.Trim());
string query=string.Format("Select ProductName ,Description,Image ,CategoryName ,IsActive from Product inner join Category on Product.CategoryId=Category.CategoryId where Product Name like '%{0}%'",SearchTextBox.Text.Replace("'","''"));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)