How to get JSON object from Razor Model object in javascript

前端 未结 5 1801
遇见更好的自我
遇见更好的自我 2020-12-02 08:09

In viewmodel object, below is the property:

  public IList CollegeInformationlist { get; set; }

In VIEW, javas

5条回答
  •  孤城傲影
    2020-12-02 09:05

    In ASP.NET Core the IJsonHelper.Serialize() returns IHtmlContent so you don't need to wrap it with a call to Html.Raw().

    It should be as simple as:

    
    

提交回复
热议问题