نوشته شده توسط plus string sql = string.Format("SELECT * FROM tmoshtari where namemoshtari LIKE '%{0}%'", txtname.Text.Replace("'", String.Empty)); خیلی ممنون ولی وقتی textbox خالی رو جستجو میکنم تمام اسامی رو داخل listbox میاره ولی هرکدوم از اسامی رو وارد میکنم هیچی داخل listbox نمیاره.
string sql = string.Format("SELECT * FROM tmoshtari where namemoshtari LIKE '%{0}%'", txtname.Text.Replace("'", String.Empty));
قوانین سایت