数据绑定控件再ASP.NET1.X和ASP.NET2.0的区别
来源:互联网 发布:鹦鹉螺雾化芯diy数据 编辑:程序博客网 时间:2024/05/24 06:58
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.basedataboundcontrol_members(VS.80).ASPx
查看该类
如果你查看该类的成员,请注意下面两个属性和方法
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
数据绑定在ASP.NET2.0里进一步得到简化,绑定控件的基类来自于BaseDataBoundControl,你可以到http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.basedataboundcontrol_members(VS.80).ASPx
查看该类
如果你查看该类的成员,请注意下面两个属性和方法
virtual object DataSource { get; set; }
virtual string DataSourceId { get; set; }
protected abstract void PerformSelect();
protected abstract void ValidateDataSource(object dataSource);
DataGrid1.DataSource=DataSet1.Table[0];
DataGrid1.DataBind();
GridView.DataSourceID=DataSource1;
其实,
在ASP.NET1.X里,如果你使用DataSource属性,将自动调用ValidateDataSource 方法
在ASP.NET2.0里,如果你使用DataSourceID属性,将自动调用PerformSelect方法
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 数据绑定控件再ASP.NET1.X和ASP.NET2.0的区别
- asp.net2.0和asp.net1.X 的区别!
- ASP.NET1.1数据绑定与ASP.NET2.0数据绑定的方法对比
- 比较ASP.NET1.x的Code Behind和ASP.NET2.0的Code Beside
- ASP.Net2.0 数据绑定控件的优越性在哪里?
- ASP.Net2.0 数据绑定控件的优越性
- ASP.Net2.0 数据绑定控件的优越性在哪里?
- ASP.Net2.0新增的数据绑定控件
- ASP.Net2.0 数据绑定控件的优越性
- asp.net2.0数据绑定之Eval和Bind区别
- 在ASP.NET1.X和ASP.NET2.0中如何创建自定义配置节
- asp.net1.1和asp.net2.0共存
- 重装asp.net1.1和asp.net2.0
- ASP.NET1.0升级ASP.NET2.0的问题小结
- ASP.NET1.0升级ASP.NET2.0的问题小结
- Asp.net1.0升级ASP.NET2.0的几个问题总结
- ASP.NET1.1、ASP.NET2.0、ASP.NET3.5中验证控件等问题
- ASP.NET2.0简化的控件与简化的数据绑定
- 在ASP.NETAtlas中创建自定义的Transformer
- 学习一下.netframework中有关安全的内容
- 对ASP.NET2.0下面的新控件的困惑
- 自定义ViewState的保存方式
- DataGrid的全选/取消全选控制(CheckBox)
- 数据绑定控件再ASP.NET1.X和ASP.NET2.0的区别
- 怎样才能判断出用户上传的文件中没有包含木马以及恶意病毒之类
- aspx页面中标题单点解决方案
- 为XPath自定义函数(因为XPath1.0的函数非常有限)
- 如何在web.config中建立公用的的数据库连接
- 利用WebRequest来实现模拟浏览器通过Post方式向服务器提交数据
- ASP.NET2.0正式版中无刷新页面的开发(示例代码的补充)
- 在ASP.NET中使用计时器(Timer)
- ASP.NET2.0:Ilungasoft.Framework.Web之基于Callback的无刷新上传进度条控件[带源码]