This question has been cropping up quite often so hopefully this post will make it easier to find in the search engines.
Say you want to add some code like this into a SharePoint Web Part Page
<%
Server.Transfer(@"/_layouts/listfeed.aspx?List={D5813C18-934F-4FD6-9068-5CDD59CE56BA}");
%>
If you try and view the page you will get an error saying "An error occurred during the processing of xxx.aspx. Code blocks are not allowed in this file".To enable this you need to modify the web.config file for your SharePoint Site Collection.
To enable code blocks in single files, add the following section...
<PageParserPaths>
<PageParserPath VirtualPath="/pages/blog.aspx" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths>
To specify all files in a path (Document Library) the path statement can include a wild card (*) in which case you can also add IncludeSubFolders="true" parameter to the PageParserPath to allow inline code for any page.