New Introduction to ASP.NET 2.0 Web Parts Framework

MSDN发布新文章介绍ASP.NET 2.0 Web Parts框架特性。Web Parts是可定制网页界面的构建块,新框架具备个性化、部件间通信和创建自定义菜单等功能。个性化可让用户修改部件属性并存储在数据库,部件间通信也更便捷,还能通过添加自定义菜单选项方便用户修改属性。

New Introduction to ASP.NET 2.0 Web Parts Framework<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Posted by: Paul Ballard on October 15, 2004 @ 01:37 AM

URL: http://www.theserverside.net/news/thread.tss?thread_id=29465

 

MSDN has released a new paper that highlights the features of the ASP.NET 2.0 Web Parts Framework. Formerly restricted to SharePoint sites, Web Parts are the building blocks for an easily customizable web interface and are becoming fully supported features of ASP.NET 2.0. The new Web Part Framework includes features for personalization, communication between Web Parts, and creating custom menus.

Web Parts are similar to web user controls but provide the functionality to allow users to customize the website by adding, deleting, and moving controls around the page based on WebPartZones. Any ASP.NET server control can act as a Web Part but by creating a custom control derived from the WebPart class you gain access to advanced features.

One of those features is personalization. Personalization allows a user to make modifications to a part’s properties that are then stored in the database. When the user returns to the site, the changes are applied. This feature is enabled with a simple [Personalizable()] attribute.

Communication between parts is also an important feature of the Web Parts Framework. Previously, this was a rather complicated process but now it’s considerably easier.

There are four steps that you must complete to create a static connection between two Web Parts:

1. You must define an interface specifying the methods and properties that are shared between the connected Web Parts.

2. You must add the ConnectionProvider attribute to the Web Part used to provide the shared information.

3. You must add the ConnectionConsumer attribute to the Web Part used to consume the shared information.

4. You must declare the connections within the StaticConnections sub tag of the WebPartManager class.

Modifying Web Part properties is easier for users by adding custom menu options to your Web Part. This is done by overriding the Verbs property and adding new WebPartVerbs.

注:

1,目前只有SPS支持Web Parts,当然开发平台还是VS.Net IDE

2,未来SPS版本(SPS 2003以后的版本)将会基于WebParts of ASP.NET 2.0(来自comments, not official)。

 

Reference:

1, http://www.theserverside.net/news/thread.tss?thread_id=29465

2, Meet the Web Part Framework, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-meetwebpartfrmwrk.asp

转载于:https://www.cnblogs.com/rickie/archive/2004/10/20/54444.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值