绑定了一个REPEATER,一个DATALIST,怎么样才能只显示一个啊
我第一次选择时显示了一个REPEATER,第二次选择时出现了DATALIST,那个REPEATER也还在上面,但是我如果只要一个时间显示一个该怎么做呢? <script runat= "server ">
void Page_Load(Object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
OleDbConnection condatabase;
OleDbCommand cmdSelectdatabase;
OleDbDataReader dtrdatabase;
// Retrieve records from database
condatabase = new OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=E:\\powerflow\\loadflow.mdb ");
condatabase.Open();
cmdSelectdatabase = new OleDbCommand( "Select * from main ", condatabase);
dtrdatabase = cmdSelectdatabase.ExecuteReader();
// Bind to dropdownlist
droplist.DataSource = dtrdatabase;
droplist.DataTextField = "TYPE ";
droplist.DataBind();
dtrdatabase.Close();
condatabase.Close();
}
}
void Search_Click(object sender, System.EventArgs e)
{
OleDbConnection condatabase;
string strSelect;
string strsql;
string tt;
OleDbCommand cmdSelect1;
OleDbCommand cmdSelect2;
OleDbDataReader strdatabase;
condatabase = new OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA