Click here to Skip to main content
Click here to Skip to main content

Allowing Inline C# Code in MOSS2007 Master Pages

, 14 Jul 2010
Rate this:
Please Sign up or sign in to vote.
Does not do anything amazing but does show you can use the SharePoint object model in your inline code. If you saved the master page now and opened the site in your browser you’d get an error about not being able to run code blocks. There’s an extra line you need to put into your web.config file first to allow this inline C# to execute.
 
<PageParserPaths> 
<PageParserPath VirtualPath="/_catalogs/masterpage/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" /> 
</PageParserPaths>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

hussain.attiya
Architect Gulf air - Bahrain
Bahrain Bahrain
Current Position is : Information System Analyst
 
Leading a Team of Developers for developing ecommerce websites and systems integration using several integration methods such as XML.
 
Manage ISP infrastructure, web servers, database servers, application servers, email servers and networks. Design the architecture of complex web applications; build web applications in JAVA, asp, asp.Net; manage web sites including networking and database; experienced in MS Sql Server and Oracle;
 
stay current with emerging trends and technological advances in the industry.
 
MCTS,MCAD VB.NET, ASP.NET and XML Services,BTEC National Diploma in Computer Studies.

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 14 Jul 2010
Article Copyright 2010 by hussain.attiya
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid