JQuery用户界面按钮触发"潜在危险的Request.Form值"错误在IE浏览器 [英] JQuery UI button triggering "potentially dangerous Request.Form value" error in IE

查看:163
本文介绍了JQuery用户界面按钮触发"潜在危险的Request.Form值"错误在IE浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始测试我的IE浏览器的应用程序,并发现正在使用JQuery用户界面按钮风格的按钮都张贴他们的整个内容到服务器。这意味着,他们发布与它里面的文本的跨度。这会触发在ASP.Net错误从客户端检测到有潜在危险的Request.Form值a。这不符合&LT发生;输入类型=提交/> 确实按钮元素。但是我有一个触发JavaScript和因此不应该被设置为按钮元素<输入类型=提交/方式>

I have begin testing my application with IE and have found that buttons that are styled using JQuery UI button are posting their entire content to the server. This means that they post a span with the text inside it. This triggers a "A potentially dangerous Request.Form value was detected from the client" error in ASP.Net. This does not happen with <input type=Submit /> but does with Button elements. However I have button elements which trigger JavaScript and so should not be set up as <input type=Submit />.

我该如何解决这个问题?看来,它必须是足够常见的,有一个被广泛接受的解决方案,但我一直无法通过搜索找到任何东西。

How do I fix this? It seems that it must be common enough that there is a widely accepted solution but I haven't been able to find anything by searching.

推荐答案

根据您的成功:删除按钮名称属性解决了这个问题。

Per your success: Removing the button name attribute solves the problem.

这篇关于JQuery用户界面按钮触发&QUOT;潜在危险的Request.Form值&QUOT;错误在IE浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆