コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     PostContent.Attributes.Add("style", "resize:none");
     CategoriesService catService = new CategoriesService();
     CategorySelect.DataSource = catService.All().Select(x=> x.CategoryName).ToList();
     CategorySelect.DataBind();
     Page.DataBind();
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }

            CategoriesService categories = new CategoriesService();
            var categoriesData = categories.All().ToList();

            this.ListViewCategories.DataSource = categoriesData;
            this.ListViewCategories.DataBind();
        }