问题描述
usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.ComponentModel;publicpartialclassCustomControl_DateSelect:System.Web.UI.UserControl{privateintendYear;privateintbeginYear;///<summary>///开始年///</summary>[Category("自定义")][Description("开始年")]publicintBeginYear{get{returnbeginYear;}set{beginYear=value;}}///<summary>///年份的结束年,请填写大于0的整数///</summary>publicintEndYear{get{returnendYear;}set{endYear=value;}}///<summary>///获取控件中的年///</summary>publicstringYear{get{returndrpYear.SelectedValue;}}///<summary>///获取控件中的月///</summary>publicstringMonth{get{returndrpMonth.SelectedValue;}}///<summary>///获取控件中的日///</summary>publicstringDay{get{returndrpDay.SelectedValue;}}protectedvoidPage_Load(objectsender,EventArgse){}protectedvoiddrpYear_Load(objectsender,EventArgse){if(beginYear<0)beginYear=0;if(endYear<0)endYear=0;inti;for(i=0;i<drpYear.Items.Count;i++){if(drpYear.Items[i].Value!="-1"){drpYear.Items.RemoveAt(i);}}for(i=beginYear;i<=endYear;i++){drpYear.Items.Add(newListItem(i.ToString(),i.ToString()));}}protectedvoiddrpMonth_Load(objectsender,EventArgse){inti;for(i=0;i<drpMonth.Items.Count;i++){if(drpMonth.Items[i].Value!="-1"){drpMonth.Items.RemoveAt(i);}}for(i=1;i<=12;i++){drpMonth.Items.Add(newListItem(i.ToString(),i.ToString()));}}}
明明写了summary和[Category("自定义")][Description("开始年")],但是在使用自定义控件的时候只有[Category("自定义")]有用,提示完全不出来,为什么?
解决方案
解决方案二:
比如:[Description("开始年")]首先在页面里选中CustomControl_DateSelect控件然后按F4弹出“属性页”然后点击选中【BeginYear】属性,下面就出现【开始年】的描述字样了
解决方案三:
楼上我知道啊,我就是在问为什么没有提示啊???
解决方案四:
友情up学习