自定义控件中使用属性

来源:互联网 发布:淘宝宝贝详情页优化 编辑:程序博客网 时间:2024/04/30 13:55
在页同中引用入了
<%@ Register TagPrefix="B2B" TagName="psd" Src="Product_sort_DropDownList.ascx" %>
控件后。
在cs页同中声明
protected 命名空间.类名 控件名称;

protected Webs.Admin_manage.Product_sort_DropDownList psd1;

#region 属性取值

        public int List1Value
        {
            get
            {
                return int.Parse(DropDownList1.SelectedItem.Value);
            }
        }

        #endregion
原创粉丝点击