<script language="javascript" src="../WEBUI/NOVEL/ShowChapterData.aspx?Cid=295" type="text/javascript">
</script>
</body>
</html>

在shtml模板得最下面加入以上类似代码~

注意shtml得 编码最好是utf=8

然后:

 

 [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")]
    protected override void Render(HtmlTextWriter writer)
    ...{
        if(chapter.Load())
        ...{
            StringBuilder sb = new StringBuilder();
            sb.Append("document.getElementById('name1').innerText = '" + chapter.ChapterTitle + "';");
            sb.Append("document.getElementById('ctitle1').innerText = '" + chapter.ChapterTitle + "'; ");
         }
       
    }
在ShowChapterData.aspx 中加入以上类似代码!

这样就可以在shtml中显示数据库中的数据了~

相关文章:

  • 2022-01-23
  • 2021-07-15
  • 2022-01-31
  • 2021-07-26
  • 2021-07-26
  • 2022-02-14
  • 2021-08-18
  • 2022-01-17
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2021-10-15
相关资源
相似解决方案