添加一个类以覆盖OnPreInit到现有页面 [英] Adding a class to override OnPreInit to an existing page
问题描述
我的目标是,如果用户属于特定的安全组,则为我的SharePoint网站使用备用母版页.
My goal is to utilize an alternate masterpage for my SharePoint site if a user belongs to a particular security group.
我看到了许多建议通过创建新类来覆盖OnPreinit的示例.在ASP.NET中创建类很方便,但是我不能将这些类应用于现有的SharePoint网站.
I see many examples that suggest overriding OnPreinit by creating a new class. While creating classes in ASP.NET is well in my comfort zone-- applying these classes to an existing sharepoint site is not.
是否有人可以提供有关如何将此类添加到现有SP 2013网站的指导?
Is anyone able to help provide some guidance as to how this class may be added to an existing SP 2013 site?
我当前的设置:我在开发计算机上运行Visual Studio 2017,该开发计算机位于与承载SharePoint 2013环境的服务器不同的网络上.
My current setup: I'm running Visual Studio 2017 on my development machine which resides on a network separate from the server hosting the SharePoint 2013 environment.
谢谢
推荐答案
嘿
您需要使用ASP.NET创建自己的母版页.在性能方面要小心.
You need to create your own master page with ASP.NET. Be careful on the performance aspect.
https://blog.sharepointexperience.com/2011/09/09/just-the-essentials-sharepoint-master-pages/
这篇关于添加一个类以覆盖OnPreInit到现有页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!