<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中显示数据库中的数据了~