• 自定义属性的注释 可用于用户控件的帮助信息.


    用户控件的属性要能够在属性窗口上显示,则要写特性!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;”
    用于写客户端脚本.
  • 相关阅读:
    [Leetcode]480. Sliding Window Median
    C++的一些小的知识点
    extern关键字
    c++的默认构造函数 VS 深拷贝(值拷贝) 与 浅拷贝(位拷贝)
    inline-内联函数的优点以及与宏定义的区别
    char类型输出地址
    c++ 对象的内存布局
    Shell 去掉文本中的空格
    牛客网-网易编程题 双端队列找规律
    计算机网络概观
  • 原文地址:https://www.cnblogs.com/MySpace/p/1599781.html
Copyright © 2020-2023  润新知