All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
用.NET实现所见即所得的设计器_[Asp.Net教程]
ASP.NET Remoting体系结构(五)
动态网页制作技术PHP常用的正则表达式_[PHP教程]
delphi组件的基本操作
c#,static的全部用法收集整理_[Asp.Net教程]
网页两侧浮动广告代码_JavaScript技术_编程技术
PHP的session的疑难问题及解决方法_[PHP教程]
ASP.NET日历控件二次开发和使用_[Asp.Net教程]
asp.net中Server对象的应用实例
sql中获得部分时间的方法_[SQL Server教程]
Reading number is top 10 pictures
The real super beauty14
人美胸美腿更美3
The money of more than 100 countries and regions9
The little woman's bright wire2
俄罗斯台球天后惊艳魅惑2
真正的国产-非模拍 贵在是真实2
China telecom 114 spokesman MeiYanXu1
Original author said, this is the Hengyang people
China's programmers are live what kind, had a look at will know that
泳装名模阿尔贝特妮写真2
Download software ranking
Call Of Duty2
Unix video tutorial8
Unix video tutorial17
Tram sex maniac 2 (H) rar bag2
The cock of the Grosvenor LTD handsome
Visual C++界面编程技术
Tram sex maniac 2 (H) rar bag1
Boxer's Top ten classic battle1
The Bermuda triangle2
Tram sex maniac 2 (H) rar bag6
归海一刀 published in(发表于) 2014/1/30 0:51:26 Edit(编辑)
ASP.NET,3.5,Extensions新特性:ASP.NET,Dynamic,Data,体验1_[Asp.Net教程]

ASP.NET,3.5,Extensions新特性:ASP.NET,Dynamic,Data,体验1_[Asp.Net教程]

ASP.NET 3.5 Extensions新特性:ASP.NET Dynamic Data 体验1_[Asp.Net教程]


概述


ASP.NET 3.5 Extensions CTP包含了一个新特性是“ASP.NET Dynamic Data Support(动态数据支持)”,它允许我们不用编写一行代码极其快速地建造使用LINQ to SQL对象模型的数据驱动的网站。

创建ASP.NET Dynamic Data站点


安装完ASP.NET 3.5 Extensions后,可以在新建项目对话框中看到一项Dynamic Data WebSite:

创建完成后,项目结构如下:

TerryLee_DynamicData_002


在解决方案中会有一个App_Shared文件夹,下面有DynamicDataFields和DynamicDataPages等子文件夹,这里面放的都是些模板文件,可以通过这些模板文件来定制网站的外观,这个下一篇再说。


添加数据模型


添加一个LINQ to SQL文件,以Petshop4的数据库为例:


TerryLee_DynamicData_003


启用动态数据模板


打开Web.config,找到dynamicData一节,设置enableTemplates属性为true,默认为false。


TerryLee_DynamicData_004


运行站点


1.运行站点后,在默认的主页上列出了在数据模型中添加的所有数据表:


TerryLee_DynamicData_005


2.点击Categories进入,为我们生成了一个列表界面,显示出Categories中的数据,并且自动根据外键关系,显示了Products一列,可以导航到Category对应的Product,同时


TerryLee_DynamicData_006


3.内置的分页支持,同时显示出可以选择每页显示的记录数:


TerryLee_DynamicData_007


4.根据主外键自动列出筛选条件:


TerryLee_DynamicData_008


5.编辑界面自动列出Supplier供选择:


TerryLee_DynamicData_009


6.自动生成的新增数据界面:


TerryLee_DynamicData_010


7.内置的数据验证支持:


TerryLee_DynamicData_011


结束语


看了上面的效果,是不是有些心动,赶快体验一下吧:),在ASP.NET Dynamic Data体验下篇中学习如何进一步定制网站。


ASP.NET 3.5 Extensions新特性:ASP.NET Dynamic Data 体验(下)


作者:TerryLee


出处:http://terrylee.cnblogs.com







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.