<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to escape a leading # within the C preprocessor</title><link>http://blogs.msdn.com/jrock/archive/2008/04/22/how-to-escape-a-leading-within-the-c-preprocessor.aspx</link><description>This is probably a no-brainer for most people, but for some reason I banged my head against the wall for about an hour trying to figure this one out. Background Oftentimes you have source files (or in our case aspx files) that contain common headers,</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How to escape a leading # within the C preprocessor</title><link>http://blogs.msdn.com/jrock/archive/2008/04/22/how-to-escape-a-leading-within-the-c-preprocessor.aspx#8418924</link><pubDate>Wed, 23 Apr 2008 15:09:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8418924</guid><dc:creator>Dimitar Dimitrov</dc:creator><description>&lt;p&gt;Ever heard of server side includes?&lt;/p&gt;
&lt;p&gt;They look like this:&lt;/p&gt;
&lt;p&gt;&amp;lt;!--#include virtual=&amp;quot;/path_doctype_def&amp;quot; --&amp;gt; &lt;/p&gt;
&lt;p&gt;SSI have been around for something like 12 years, and last time I checked were still supported in asp.net&lt;/p&gt;</description></item><item><title>re: How to escape a leading # within the C preprocessor</title><link>http://blogs.msdn.com/jrock/archive/2008/04/22/how-to-escape-a-leading-within-the-c-preprocessor.aspx#8419544</link><pubDate>Wed, 23 Apr 2008 21:08:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8419544</guid><dc:creator>Justin Rockwood</dc:creator><description>&lt;p&gt;Thanks for the comment, Dimitar. Yes, server side includes are great for some things. However, when you want to use macros, then they're not quite as handy. It would be a lot harder (and sometimes not possible) to do something like this:&lt;/p&gt;
&lt;p&gt;REGISTER_DIRECTIVE(prefix, namespace, assembly)&lt;/p&gt;
&lt;p&gt;That macro will put all of the same assembly junk (like version, strong name, etc.) so you don't have to repeat it on every page and it changes with every build. Granted, you could also do it with a server-side include, but why incur the extra runtime overhead and the extra files that you need to deploy on your web server?&lt;/p&gt;
&lt;p&gt;Don't get me wrong, server side includes have their place. It's just that for these scenarios they seem like they're a little overkill.&lt;/p&gt;</description></item></channel></rss>