Is this invalid to put in an aspx file? I have some static aspx pages and I want to add a bit of C# to one of them. How can I do this?
I figured just adding
<%@ Page Language="c#"%>
and then using <% %> to put a bit of C# goodness in there, but it says Syntax Error. with a blue wavy line over this code.
This happens whenever you change the Language attribute of the Page directive. Simply close the file in Visual Studio, and reopen it. The error will go away.