We're working on a very large project that has been exclusively written in VBScript/javascript/HTML. We're starting to port it over, page-by-page into C#.
We have split out common constants and code into <# Include .asp files, but when we go to try to include these files into out new C# .aspx files, we get the compiler error:
Compiler Error Message: CS1010: Newline in constant
Source Error:
Line 1: <%
Line 2: 'This is a comment
Line 3: 'This is another comment
Of course, this is because in VBScript, ' is a comment character, and in C# it isn't.
Is there any way to pre-warn the compiler that the include is going to be in another language, like:
<%@ Language="VBScript" %>
<!--#include file='CommonConstants.asp'-->
<%@ Language="C#" %>
?