>System.Data.DataSet dssearch = new DataSet(); >[Bindable(true), >Category("Data"), >DefaultValue("")] >public System.Data.DataSet dsSearch > { > get > { > this.EnsureChildControls(); > return dssearch; > } > set > { > this.EnsureChildControls(); > dssearch = value; > } > } > > > >void cmdSearchClicked(System.Object sender, System.EventArgs e) >{ > this.oConSearch.ConnectionString = this.connectionstring; > this.oConSearch.Open(); > SqlDataAdapter oDaCustomer = new SqlDataAdapter(this.SearchProcedure,this.oConSearch); > oDaCustomer.SelectCommand.CommandType = CommandType.StoredProcedure; > oDaCustomer.SelectCommand.CommandText = this.searchproc; > if (this.paramname.Trim().Length > 0) > { > this.lblMessage.Visible = true; > oDaCustomer.SelectCommand.Parameters.Add(this.paramname,System.Data.SqlDbType.VarChar,this.paramsize); > oDaCustomer.SelectCommand.Parameters[this.paramname].Value = this.txtSearch.Text; > this.dssearch.Clear(); > oDaCustomer.Fill(this.dssearch); > this.oConSearch.Close(); > this.lblMessage.Text = this.txtSearch.Text + " " + oDaCustomer.SelectCommand.CommandText + " " + this.dssearch.Tables[0].Rows.Count.ToString(); > if (this.dssearch.Tables.Count > 0) > { > this.RecordCount = this.dssearch.Tables[0].Rows.Count; > } > } >} >