Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC @import html keyword

I'm trying to use:

<style>@import url("css/main.css");</style>

but mvc treats it as .net code in razor view. "CS0103: The name 'import' does not exist in the current context" how do i fix it? thanks

like image 878
ShaneKm Avatar asked Mar 11 '11 19:03

ShaneKm


1 Answers

Double the @ to fix the issue:

<style>@@import url("css/main.css");</style>

More details here.

like image 156
George Stocker Avatar answered Oct 09 '22 21:10

George Stocker