I think the problem is where you're building your select
SqlDataAdapter da = new SqlDataAdapter("select * from mudiamINC where fname like" + TextBox1.Text + " %", con);
I'm think you need a space after the like, but not before the %
SqlDataAdapter da = new SqlDataAdapter("select * from mudiamINC where fname like " + TextBox1.Text + "%", con);
Note however that I suspect this code is 'bad form'. You are taking user input without validation and putting it into SQL queries. This potentially puts your application at risk for SQL injection attacks.
Reputation Points: 344
Solved Threads: 116
Practically a Master Poster
Offline 670 posts
since May 2008