62,266
社区成员
发帖
与我相关
我的任务
分享public class index:Page
{
protected string GetJson()
{//获取json字符串
}
}
aspx页面中
<script>
var jsonData = eval('<%=GetJson()%>')
<script>var %=GetJson()%<%=GetJson()%>'
index.aspx.cs包含GetJson方法,该方法至少要Protected级别