[SPS2010] 启用 Inline Code 功能

使用sharepoint designer 2010打开sharepoint网站

inline-Code-p1

选择All files

inline-Code-p2

选择_catalog

inline-Code-p3

选择Masterpage

inline-Code-p4

选择v4.master

inline-Code-p5

在<body>下插入

<asp.label runat=”server” Text=”label 1” id=”label1” />

<script runat=”server”>

protected void Page_load(object sender,EventArg e)

{

lable1.Text = “Hello Inline Code world!”;

}

</script>

inline-Code-p6

保存

inline-Code-p7

打开IIS管理器

inline-Code-p8

选择sharepoint 网站

打开web.config

inline-Code-p9

在<sharepoint>下的 <PageParserPaths>下插入

<PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />

保存。

新的显示如下

inline-Code-p10

原文地址:https://www.cnblogs.com/by1455/p/1802389.html