Gavin Miller
Gavin Miller

Reputation: 43815

Can I disable #include in ASP.NET?

I have been unable to find anything using the google... If I write on my ASP.NET code page:

<!-- #include file="file_to_include.aspx" -->

the file is output to the page. How do I disable this behavior?


MSDN info on #include and Server Side Include (SSI)

Upvotes: 1

Views: 355

Answers (1)

George Stocker
George Stocker

Reputation: 57877

Even Newer Answer Now with More Cowbell!

It turns out you can disable Server Side Includes in the Web Service Extensions Manager of IIS: alt text

Just select Server Side Includes and click the Prohibit button.

Answer #2Newer Answer:

How about disabling server side includes in IIS?


Old Answer

If you use a Server Side comment, that should work.

Try this:

<%--  <!-- #include file="file_to_include.aspx" --> --%>

Upvotes: 5

Related Questions