protected void Page_Load(object sender, EventArgs e)
{
// 首次加载页面时才绑定
if (!IsPostBack)
{
BusinessLogic bll = new BusinessLogic();
// 获取数据库“D00001”下拉框对应数据
DataTable dt = bll.GetData("D00001");
// 给下拉框绑定数据源
ddldata.DataSource = dt;
// 绑定下拉框的text值
ddldata.DataTextField = "AREA";
// 绑定下拉框的value值
ddldata.DataValueField = "AREA";
ddldata.DataBind();
// 在头部插入一条空的item
ddldata.Items.Insert(0, new ListItem("", ""));
}
}