In SharePoint, inline code is not allowed. If you need to add some inline code to an aspx page, there is a setting in the web.config that must be set.
The following XML is wrapped in the SafeMode node.
Remember to change the VirtualPath attribute to your specific path where inline code is to be expected. This should be set conservatively to now allow all pages with inline code.