SqlCommand command = new SqlCommand("select img from exp where (here i stuck....)", con);
change this to ======>
SqlCommand command = new SqlCommand("select img from exp where name='"+imageid+"'", con);
When you are calling this handler just pass the text box value in the querystring name "img" then everything should work fine.