示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["User"] == null)
        {
            Response.Redirect(cms.Current.GetRootPath);
        }

        if (!this.IsPostBack)
        {
            CategoryDropdownList.DataValueField = "CategoryRef";
            CategoryDropdownList.DataTextField  = "CategoryName";
            CategoryDropdownList.DataSource     = Category.GetCategoryList();
            CategoryDropdownList.DataBind();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        searchForLinkText = Utils.GetResourceText("SearchForLinkText");
        if (!this.IsPostBack)
        {
            CategoryDropdownList.DataSource     = Category.GetCategoryList();
            CategoryDropdownList.DataTextField  = "CategoryName";
            CategoryDropdownList.DataValueField = "CategoryRef";
            CategoryDropdownList.DataBind();

            CategoryDropdownList.Items.Insert(0, new ListItem("Kategori", "0"));
        }

        //this.Page.Form.Action = cms.Current.GetRootPath + "Search";
    }