Razor/JavaScript and trailing semicolon

前端 未结 7 879
不知归路
不知归路 2020-12-01 11:30

Using Visual Studio 2012, on a Razor view page, in the JavaScript section, I am getting what I think is a battle between Razor syntax vs JavaScript syntax. In particular, th

相关标签:
7条回答
  • 2020-12-01 12:21

    This worked for me:

    var customer = @Html.Raw(ViewBag.CustomerJSON + ";")
    
    0 讨论(0)
提交回复
热议问题