protected void BindImageCategories()
		{
			ddlImageCategories.Attributes.Add("onchange", "callToServer(this.form.name, this.name, 'Image', '" + ddlImages.ClientID + "', 'ImageLoader.aspx');");

			BPImageCategories bp = new BPImageCategories();
            DSImageCategories = bp.SelectAllActiveNonGallery();
			DSImageCategories.tbl_ImageCategories.DefaultView.Sort = "ImageCategoryName";

            ddlImageCategories.DataSource = DSImageCategories.tbl_ImageCategories.DefaultView;
            ddlImageCategories.DataValueField = DSImageCategories.tbl_ImageCategories.ImageCategoryIDColumn.ColumnName;
            ddlImageCategories.DataTextField = DSImageCategories.tbl_ImageCategories.ImageCategoryNameColumn.ColumnName;
			ddlImageCategories.DataBind();

			ddlImageCategories.Items.Insert(0, new ListItem("(All Image Categories)", "-1"));
		}
        protected void BindDropDownFilters()
        {
            BPImageCategories bp = new BPImageCategories();
            BEImages dsImageCategories = new BEImages();

            //galleries dropdown
            dsImageCategories = bp.SelectAllGalleries();
            dsImageCategories.tbl_ImageCategories.DefaultView.Sort = "ImageCategoryName";

            ddlImageGalleries.DataSource = dsImageCategories.tbl_ImageCategories.DefaultView;
            ddlImageGalleries.DataTextField = "ImageCategoryName";
            ddlImageGalleries.DataValueField = "ImageCategoryID";
            ddlImageGalleries.DataBind();

            ddlImageGalleries.Items.Insert(0, new ListItem(" (All Galleries) ", "-1"));
            ddlImageGalleries.Items.Insert(1, new ListItem("Not Assigned", "0"));

            if (FilterCatID != "-1")
                if (ddlImageGalleries.Items.FindByValue(FilterCatID) != null)
                    ddlImageGalleries.SelectedValue = FilterCatID;

            //categories dropdown
            dsImageCategories.Clear();
            dsImageCategories = bp.SelectAllActiveNonGallery();
            dsImageCategories.tbl_ImageCategories.DefaultView.Sort = "ImageCategoryName";

            ddlImageCategories.DataSource = dsImageCategories.tbl_ImageCategories.DefaultView;
            ddlImageCategories.DataTextField = "ImageCategoryName";
            ddlImageCategories.DataValueField = "ImageCategoryID";
            ddlImageCategories.DataBind();

            ddlImageCategories.Items.Insert(0, new ListItem("(All Categories)", "-1"));
            ddlImageCategories.Items.Insert(1, new ListItem("Not Assigned", "0"));

            if (FilterCatID != "-1")
                if (ddlImageCategories.Items.FindByValue(FilterCatID) != null)
                    ddlImageCategories.SelectedValue = FilterCatID;
        }