asp.net ajax 类型系统demo
<mce:script language=javascript><!--
//注册命名空间
Type.registerNamespace("Demo");
Demo.Message=function(content,publishTime)
{
this._content = content;
this._publishTime = publishTime;
}
Demo.Message.prototype=
{
get_content: function()
{
return this._content;
},
get_publishTime: function()
{
return this._publishTime.format("yyyy-MM-dd HH:mm:ss");
},
toString: function()
{
return this.get_content() + " " + this.get_publishTime();
}
}
//注册类
Demo.Message.registerClass("Demo.Message");
Demo.IContent=function()
{
}
Demo.IContent.prototype
{
showContent:function()
{}
}
//注册接口
Demo.IContent.registerInterface("Demo.IContent");
Demo.MessageWithUserId = function(userId, content, publishTime)
{
Demo.MessageWithUserId.initializeBase(this, [content, publishTime]);
this._userId = userId;
}
// 定义Demo命名空间下的MessageWithUserId类的方法
Demo.MessageWithUserId.prototype =
{
get_userId: function()
{
return this._userId;
},
showContent: function()
{
return Demo.MessageWithUserId.callBaseMethod(this, 'get_content')
},
// callBaseMethod用于调用基类的方法
toString: function()
{
return this.get_userId() + " " + Demo.MessageWithUserId.callBaseMethod(this, 'toString');
}
}
// 注册一个继承自Demo.Message类和Dem
相关文档:
我的理解profile就是通过我们编写的配置文件 自动的再数据库中保存我们需要的数据。
这是一个简单的配置:
<profile automaticSaveEnabled="true" defaultProvider="sqlprocider">
<providers>
<add name="sqlprocider" type="Syste ......
概念:当位于UpdatePanel控件外部的某个控件的特定事件被触发时就引发异步回送并局部更新UpdatePanel控件的内容。
它的好处是:我们只需把需要更新的数据控件放在UpdatePanel控件里,而不需要更新的控件我们就把它放在UpdatePanel控件的外面,如此一来,才可以有效的降低往返于WEB服务器的数据量,并顺势降低WEB服务 ......
数据绑定概述和语法
ASP.NET 引入了新的声明性数据绑定语法。这种非常灵活的语法允许开发人员不仅可以绑定到数据源,而且可以绑定到简单属性、集合、表达式甚至是从方法调用返回的结果。下表显示了新语法的一些示例。
简单属性 Customer: <%# custID %>
集合 Orders: <asp:ListBox id="List1" datasour ......
到软件公司学IT技术http://www.tsp2c.cn/
Ajax 应该不是一项技术,是一种思想而已,跟 ASP.NET 以及其它 Web 开发语言没有什么太大关系,这里只是谈谈 ASP.NET 中目前使用的 Ajax 技术以及其它一些实现 Ajax 的优秀框架。
Ajax 已经很流行一阵子了,现在谈 Ajax 觉得有点老土。目前所谓的 Web2.0 网站,基本上没有不 ......