---
title: "Hot to escape and unescape @ in mvc?"  
description: "Hot to escape and unescape @ in mvc?"  
author: "Anonymous User"  
published: 2014-10-29  
updated: 2014-10-29  
canonical: https://www.mindstick.com/forum/2460/hot-to-escape-and-unescape-in-mvc  
category: "asp.net mvc"  
tags: ["asp.net mvc", "mvc"]  
reading_time: 1 minute  

---

# Hot to escape and unescape @ in mvc?

I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to make [dynamic](https://www.mindstick.com/blog/11080/features-of-java-dynamic-complied-and-interpreted) [CSS](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem) [import](https://www.mindstick.com/blog/294/how-to-import-or-export-sql-server-table-data-in-ms-excel-sheet-using-c-sharp-code):\

```
@foreach (string cssUrl in Model.Css){    @@import url(@Url.Content(cssUrl));}
```

However this does not work, the @import is escaped but @[Url](https://www.mindstick.com/forum/436/url-redirection)... should not be! What [now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now)?\

## Replies

### Reply by Mark M

You could place plain text in a <text> tag:

```
@foreach (string cssUrl in Model.Css){    <text>@@import url(</text> @Url.Content(cssUrl)<text>);</text>}
```

And this might work as well (haven't tried though):\

```
@foreach (string cssUrl in Model.Css){    @@import url(@:@Url.Content(cssUrl));}
```

Note that the <text></text> tag will not be rendered.\


---

Original Source: https://www.mindstick.com/forum/2460/hot-to-escape-and-unescape-in-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
