扩展asp.net代码隐藏事件(Extending asp.net code

系统教程 行业动态 更新时间:2024-06-14 17:00:14
扩展asp.net代码隐藏事件(Extending asp.net code-behind events)

我正在开发一个项目,其中我使用外部开源库来管理表单身份验证用户在我的SharePoint Web应用程序( http://sharepoint2010fba.codeplex.com/ )上的角色。

所有功能(例如,创建新角色,用户等)都被编码到aspx代码隐藏事件中。 现在我需要扩展这些方法以添加更多功能。

如上所述,在场景中扩展功能的最佳设计方法是什么?

谢谢,沙拉斯

I am working on a project wherein I am using a external open-source library for managing roles of forms authenticated users on my SharePoint web application (http://sharepoint2010fba.codeplex.com/).

All the functionality (for e.g. creating new roles, users etc.) are coded in to the aspx code-behind events. Now I need to extend these methods to add more functionality.

What would be the best design approach to extend the functionality in the scenario as above?

Thanks, Sharath

最满意答案

在不更改原始代码的情况下扩展代码的一种方法是使用MEF,Managed Extensibility Framework。

MEF的目标是.net框架4.0,因为您使用的是SharePoint,所以可能是3.5。

请参阅MEF是否需要.NET 4? 如何让MEF在3.5上工作。

One way to extend code without changing the original code is to use MEF, the Managed Extensibility Framework.

MEF targets .net framework 4.0, since you are using SharePoint you are probably on 3.5.

See Does MEF require .NET 4? for how to get MEF to work on 3.5.

更多推荐

本文发布于:2023-04-18 00:50:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/69f826dda74dacab8e05c9d0c48ae1ba.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:事件   代码   net   asp   Extending

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!