Hi,
you can use SqlDataAdapter to execute your query in front end.
string con="<sql db="" connection="" string="">";
string query="select * from table1";
SqlDataAdapter da=new SqlDataAdapter(query,con);
Dataset ds=new Dataset();
da.fill(ds);
gridview1.datasource=ds;
gridview1.databind();</sql>
I think this will help you.