Embedding SVG in ASP.net page

前端 未结 3 1804
太阳男子
太阳男子 2021-02-15 21:51

I would like to embed svg directly into my ASP.net-MVC view so that the output looks something like this:


    
         ... &         


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-02-15 22:32

    Embed your SVG into a cshtml view file instead of a .svg file, then you should be able to use @Html.Partial to render it.

    Your partial would then look like

    @Html.Partial("~/Views/pathtosvg/svg.cshtml")

提交回复
热议问题