摘要:
public Color? TextColor { get { return _textColor; } set { _textColor = value; } } 今天看程序代码,发现Color? TextColor 这个属性的申明,感觉很不能理解,后来在google上搜索了一下,原来这是vs2005开始c#新有的特性,具体的说也可以是C#2.0的新特性。 下面是我搜索到得相关描述: Nullable Types in C# One of the "late breaking" features in C# 2.0 is what is known as "Nu 阅读全文
posted @ 2010-09-05 18:56
深海大虾
阅读(2740)
评论(0)
推荐(0)
摘要:
//首先要在PageLoad()事件中注册属性 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Button1.Attributes.Add("onclick", "return checkSame()");//为Button1添加onclick()事件 ,Button为服务器控件 }//注意:checkSame()这是一个写在aspx面页的js函数,必须有返回值,为:true 或 false } //接着写Button1的onclick事件,如果刚才的c 阅读全文
posted @ 2010-09-05 18:49
深海大虾
阅读(686)
评论(0)
推荐(0)
浙公网安备 33010602011771号