Irtiza
Irtiza

Reputation: 35

how How to use @ in external html file on asp.net mvcresource url

I created a chart by using CedarCharts in a separate .html file and after that I placed this file in my ASP.NET project's .cshtml file. But some libraries are used for this chart and it uses the @ symbol and my .cshtml file considers it as an mistake/error.

These are some libraries

<script src="https://unpkg.com/@esri/arcgis-rest-request"></script>
<script src="https://unpkg.com/@esri/arcgis-rest-feature-service"></script>

How can I remove error on @ from my razor .cshtml file.

This is expected output.

Upvotes: 1

Views: 307

Answers (1)

Beingnin
Beingnin

Reputation: 2422

You can do this in two ways

@Html.Raw("<script src='https://unpkg.com/@esri/arcgis-rest-request'></script>")

or

<script src='https://unpkg.com/@("@esri")/arcgis-rest-request'></script>

Upvotes: 1

Related Questions