使用Jtip所加载的页面中注意不能包含html/form 代码,而应该只包含内容代码段。
这是因为Jtip载入后,会将内容附加在网页上,如果父页面和子页面都包含html/form代码,会造成页面dom混乱(IE8),从而使其他事件不能正常触发。
如果jtip页面由于某些原因无法删除html等内容,可以用如下的方式只输出某个控件的内容。
代码
Response.Expires = 0;
Response.Clear();
//write content
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite =
new HtmlTextWriter(stringWrite);
IssueTree1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.Flush();
Response.End();
Response.Clear();
//write content
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite =
new HtmlTextWriter(stringWrite);
IssueTree1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.Flush();
Response.End();