05 2012 档案

ASP.NET Custom Server Control如何嵌入JS资源文件?
摘要:1.首先将JS文件ASP.NET custom control空间的DLL工程里面,将类型选择为Embedded resource2. 假设欲添加的JS文件是AjaxEnabled.js,而这个DLL工程的Assembly名字是PassTextBox,那么我们应该打开这个DLL工程的AssemblyInfo文件,添加如下attribute:[assembly: System.Web.UI.WebResource("PassTextBox.AjaxEnabled.js","text/JavaScript")]3. 当在DLL工程里面需要引用到这个JS文件的 阅读全文

posted @ 2012-05-05 12:00 李志鹏 阅读(581) 评论(0) 推荐(0)

MicrosoftAjax中的Custom Control是怎么和Sys.UI.Control联系起来的?
摘要:首先假设有如下的继承于Sys.UI.Control的JS代码,我们期望将其封装在一个Custom Control里面,即以DLL的形式在多个application里面使用:///<reference name="MicrosoftAjax.js"/>Type.registerNamespace("AjaxEnabled");AjaxEnabled.PassTextBox = function (element) { AjaxEnabled.PassTextBox.initializeBase(this, [element]); this._w 阅读全文

posted @ 2012-05-03 00:44 李志鹏 阅读(302) 评论(0) 推荐(0)

Sys.UI.Control的理解
摘要:有如下代码: 1 /// <reference name="MicrosoftAjax.js"/> 2 3 Type.registerNamespace("AjaxEnabled"); 4 5 //create constructor 6 AjaxEnabled.PassTextBox = function(element) { 7 AjaxEnabled.PassTextBox.initializeBase(this, [element]); 8 9 this._weakCssClass = null;10 this._mediumCssC 阅读全文

posted @ 2012-05-01 21:37 李志鹏 阅读(508) 评论(0) 推荐(0)

创建一个简单的Ajax组建(Component)的代码的理解
摘要:有代码如下: 1 /// <reference name="MicrosoftAjax.js"/> 2 Type.registerNamespace("AjaxEnabled"); 3 4 AjaxEnabled.PasswordStrengthComponent = function () { 5 AjaxEnabled.PasswordStrengthComponent.initializeBase(this); 6 }; 7 8 AjaxEnabled.PasswordStrengthComponent.prototype = { 9 阅读全文

posted @ 2012-05-01 00:37 李志鹏 阅读(480) 评论(0) 推荐(0)

导航