SqlCommand cmd=new SqlCommand();
cmd.Parameters.Add("@p", SqlDbType.VarChar, 20).Value = txtSearch.Text;
da = new SqlDataAdapter(cmd);
SqlConnection con = new SqlConnection("..your connection string....");
SqlDataAdapter da=new SqlDataAdapter();
DataSet ds=new DataSet();
cmd.Parameters.Clear();SqlDataAdapter da=new SqlDataAdapter();
DataSet ds=new DataSet();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_getall";
cmd.Connection = con;
da = new SqlDataAdapter(cmd);
da.Fill(ds);
DataView dv = ds.Tables[0].DefaultView;dv.RowFilter = "eName like '" + mr+"'";
gvsearch.DataSource = dv;
gvsearch.DataBind(); create proc sp_getall
as
begin
select * from tblemp
endbegin
select * from tblemp