Return Records based on ID(search in textchanged event) column and (ISActive=true) column value(ASP.NET))
<p>i am having a table Item(ItemId,ItemCode,ItemName,CategoryId,IsActive) columns.
i have a textbox for all columns.when i enter ItemId..in (txtItemId) textbox..all records based on that id should be filled in remaining textboxes for other columns.its working fine for itemid search.but my requirement is i want to filter only those records based on ItemId column with IsActive=1(true) i.e(filtering based on two columns).so,i want a query in ado.net (application level).The below query doesn't work.</p>

<pre><code>strSqlCommand = "Select * from Item1 where ItemId=" + txtItemId.Text.Trim()" and IsActive="1";
</code></pre>