注意点摘录
- 养成注册 JavaScript 事件处理函数的好习惯
在服务器端 cs 代码中为控件注册 JavaScript 事件的代码如下:
Button1.Attributes.Add("onclick", "Button1_onclick();");
注意 "Button1_onclick();" 中的分号,如果不写的话,使用 Validator 控件时就会出现脚本错误。
posted on 2009-02-04 16:25 CsharpStyle 阅读(90) 评论(0) 收藏 举报
C#, Asp.net, WinForm, WPF, Silverlight, SharePoint, SQL Server, Agile Software Development, LabView
posted on 2009-02-04 16:25 CsharpStyle 阅读(90) 评论(0) 收藏 举报