Click here to Skip to main content
15,880,543 members
Articles / Programming Languages / C#
Tip/Trick

Allowing Inline C# Code in MOSS2007 Master Pages

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
14 Jul 2010CPOL 12.4K  
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)


Written By
Architect Gulf air - Bahrain
Bahrain Bahrain
Current Position is : Sr. 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 --