使用JTip插件时需注意的一个问题
2010-06-29 08:32
337 查看
使用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();
这是因为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();
相关文章推荐
- 使用maven的maven-shade-plugin插件时需要注意的一个问题
- PHP的foreach中使用引用时需要注意的一个问题和解决方法
- 使用string.Format需要注意的一个性能问题
- 使用winsock2.h时注意的一个问题
- Python学习总结笔记(5)--进程/线程Event机制使用时要注意的一个问题
- 使用scanf和fgets需要注意的一个小问题
- 正确使用mysql + MFC的一个要注意问题
- 使用输入文件流的eof()时要注意一个问题
- ASP.NET MV框架下使用ajax上传要注意的一个问题
- 使用Entity Framework Core需要注意的一个全表查询问题
- PHP的foreach中使用引用时需要注意的一个问题和解决方法
- 使用标准C库读文件时需要注意的一个问题
- 使用jQuery Ajax功能时需要注意的一个问题(内存溢出)
- 使用UpdatePanel控件要注意的一个问题
- 负margin使用注意的一个问题
- 使用Iframe时要注意的一个问题
- 使用https的HSTS需要注意的一个问题
- php中使用$_REQUEST需要注意的一个问题