The name 'media' does not exist in the current context
asp.net-mvc, asp.net-mvc-3, css, html
Solution
The `@` is a reserved character in Razor. But you can escape it using `@@`:
@@media print
Problem
In an ASP.NET MVC 3 razor view, I have the code: ``` <!DOCTYPE html> <html> <head> <style type="text/css"> @media print { table { page-break-inside:auto; width: 100%; } tr { page-break-inside:avoid; page-break-after:auto } thead { display:table-header-group } tfoot { display:table-footer-group } } </style> </head> <body> <table> ``` However I got the error: ``` The name 'media' does not exist in the current context. ``` Thanks.