using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BookDemo.QA
{
    public partial class CatalogDropDownList : System.Web.UI.UserControl
    {
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        //创建BookDemoEntities实例
        BookDemoEntities ctx = new BookDemoEntities();
        //ddlCatalogs控件在客户端的name
        string ddlCatalogsClientName = this.ddlCatalogs.ClientID.Replace("_", "$");
        Page.Cache["CatalogDropDownListClientName"] = ddlCatalogsClientName;//放入缓存中
        Common.BindToDdlCatalogs(ddlCatalogs, ctx, false);//绑定到目录
    }
}
    }
}