文本框为什么清不空,还是有数据!
源码小弟 2009-08-05 11:49:03 this.ZDtxt.Text = ""; ZDtxt是文本框的ID.
//数据源绑定事件
protected void dateBing(string where)
{
TrackCar.BLL.XTZDB ZDBBLL = new TrackCar.BLL.XTZDB();//创建系统字典表对象
DataSet ds = ZDBBLL.GetList(where);
DataView dv = ds.Tables[0].DefaultView;
PagedDataSource pds = new PagedDataSource();//创建页面数据源对象
AspNetPager1.RecordCount = dv.Count;//多少条数据
pds.DataSource = dv;//提供数据
pds.AllowPaging = true;//翻页
pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;//选中索引
pds.PageSize = AspNetPager1.PageSize;
this.GZDList.DataSource = pds;
this.GZDList.DataBind();//绑定数据
if (dv.Count < 1) { this.ZDtxt.Text = ""; dateBing(ViewState["where"].ToString()); FunClass.AlertMSG("无数据!", ""); }
}
为什么this.ZDtxt.Text="";后还是有数据!