New Introduction to ASP.NET 2.0 Web Parts Framework
New Introduction to ASP.NET 2.0 Web Parts Framework
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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?