Frankwangyifang

  :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
用户控件的属性要能够在属性窗口上显示,则要写特性!e

[CategoryAttribute("Marketting Settings"), DescriptionAttribute("If the customer has bought more than 10 times, this is set to true")]
  public bool FrequentBuyer
  {
   get { return _frequentBuyer; }
   set { _frequentBuyer = value; }
  }

属性值
含义
CategoryAttribute
该属性对在Property控件中的属性按字母顺序进行归类
DescriptionAttribute
其值为对每个属性的具体文字描述,将会显示在property控件的底部
BrowsableAttribute
该值为是否在property控件中显示或者隐藏某个属性
ReadOnlyAttribute
该值为某个属性值是否在property控件中只读
DefaultValueAttribute
每个属性的默认值



<span><asp:HyperLink ID="hypMyAgency" runat="server" NavigateUrl="~/SaleManager/AgentManager.aspx" Text="我负责的代理公司[{0}]"></asp:HyperLink></span>

Int count=5;
=count.ToString()
=string.Format(hypMyAgency.Text, totalAgent);
之间 的区别是:
后者可以用来填充点位符:

两者得到的结果是:
       1,  5;
       2,  我负责的代理公司[5];

FileUpload ful = new FileUpload();

        ful.FileName;   //文件名
        ful.PostedFile.ContentLength;//文件大小,单位 B,除以 1024得到 K
        ful.PostedFile.FileName;//完全路径



将数据.tostring("yyyy-mm-dd")


LinkButton: CommandArgument.属性的用法,获得返回值.
OnClientClick 属性的用法: “ history.go(-1);
return false;”
用于写客户端脚本.
posted on 2009-11-10 13:08  Frankwangyifang  阅读(242)  评论(0编辑  收藏  举报