Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

How filter values between two textbox values from sql database

$
0
0

Dear sir,

I have datalist. in it have some datas. and i have a dropdownlist1 and two textboxes when user type in first textbox1 1000 and second textbox2 10000 while appear between 1000 to 10000 datas in my datalist Like '"+dropdownlist1.text+"'.

i used following code bu it is not work. Kindly help me.

DataTable dt = db.Table("select * from tbAddmobile where price between '" + txtfrom.Text + "' And '" + txtto.Text + "' And price Like'" + DropDownList1.Text + "%'");
                    DataList1.DataSource = dt;
                    DataList1.DataBind();

Thanks & Regards

Rajeesh.p.p.

aspectind@gmail.com


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>