在textbox中添加<pre></pre>发表新闻的时候就显示这个从客户端(TextBox1="<pre> wo shi shui ...")中检测到有潜在危险的 Request.Form 值。是什么原因!
      


[解决方法]

在.aspx文件中添加:
<%@   Page   validateRequest="false"     %>

 

或者修改web.config文件:
<configuration>  
    <system.web>  
        <pages   validateRequest="false"   />  
    </system.web>  
</configuration>




备注:
1.
 
该问题也会出现在<br>等html标签的情况

 

2.
HTML元素 - pre
定义
以固定宽度字体显示文本。
Renders text in a fixed-width font.
注释
PRE 元素内的文字是已经格式化的。空格和回车都是保留的。
此元素在 Internet Explorer 3.0 及以上版本的 HTML 中可用,在 Internet Explorer 4.0 及以上版本的脚本中可用。
此元素是块元素。
此元素需要关闭标签。
Text within the PRE element is formatted. Spaces and carriage returns are preserved.
This element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4.0.
This element is a block element.
This element requires a closing tag.
示例代码
<PRE>
此文本的格式化效果

输入

完全
相同。
</PRE>
posted on 2006-03-27 09:57  今夜太冷  阅读(797)  评论(0编辑  收藏  举报