从后台返回到前端数据时,可以将所有数据转为Json格式保存。

HTML:
@using Newtonsoft.Json
<td class="hidden">@JsonConvert.SerializeObject(@item)</td>

事件将对象传入: onclick(this)
Js调用:
function onclick(objContent)
var ary = $(objContent).parents('tr:first').children('td:first');
    var jsonData = JSON.parse(arry.eq(0), text());

控制器中反序列化:

  1 Cures cure = Deserialize<Model>(Value); 

相关文章:

  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2021-11-20
  • 2021-10-13
  • 2022-12-23
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
相关资源
相似解决方案