zoukankan      html  css  js  c++  java
  • 自定义属性的注释 可用于用户控件的帮助信息.

    用户控件的属性要能够在属性窗口上显示,则要写特性!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;”
    用于写客户端脚本.
  • 相关阅读:
    Servlet开发【03】Servlet与表单|路径匹配详解
    Javascript学习的网址
    Eclipse开发Web工程步骤
    jdk环境变量配置
    Eclipse中打开html或xml卡死
    如何Eclipse中配置和使用SVN?
    Ajax
    Django 基础
    linux
    Django之ORM
  • 原文地址:https://www.cnblogs.com/MySpace/p/1599781.html
Copyright © 2011-2022 走看看