想做个asp.net+layui留言板,使用的是layui文本框,目前实现插入,回复不会。。。。
解决报错潜在危险的值的方法:
有两种方法
方法一:
修改Web.Config文件: <configuration> <system.web> <pages validateRequest="false" /> </system.web> </configuration>
方法二:
在.aspx页面中添加:
<%@ Page validateRequest="false" %>
但还是不行.我就郁闷了.后来一想.原来我用的是.net 4.0 还需要在web.config里面加一句
<configuration> <system.web> <httpRuntime requestValidationMode="2.0" /> </system.web> </configuration>
问题就解决了!可以插入表情到数据库了~~~
ps:有谁做过的asp.net+layui 留言回复的请指教一哈,欢迎留下神秘代码。