添加一个类以覆盖OnPreInit到现有页面 [英] Adding a class to override OnPreInit to an existing page

查看:61
本文介绍了添加一个类以覆盖OnPreInit到现有页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是,如果用户属于特定的安全组,则为我的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://support.office.com/zh-CN/article/Introduction-to-ASP-NET-master-pages-5BAC2​​190-DA6C-48ED-B6E9-E15F396EE102

https://blog.sharepointexperience.com/2011/09/09/just-the-essentials-sharepoint-master-pages/

这篇关于添加一个类以覆盖OnPreInit到现有页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆