我想在后面的代码中更新div的内容:
StringWriter stringWriter = new StringWriter();
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
// adding new contents for htmlWriter
// update the div content
divBuilder.InnerHtml = stringWriter.ToString();
divBuilder只是一个html div:
<div id="divBuilder" runat="server"></div>
适用于IE和Chrome。事件在本地主机上与Firefox一起运行良好,但在服务器上传网站后,我收到了这个错误:
cannot get inner content of divBuilder because the contents are not literal
在某些网站上搜索,我来到了这个网站:http://forums.asp.net/t/1168614.aspx/1 但那么如何更新内容?
提前致谢。