在asp.net中阻止HTTP代码

编程入门 行业动态 更新时间:2024-10-27 05:33:59
本文介绍了在asp中阻止HTTP代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何防止asp中的HTTP链接....用于名称"字段,描述"字段等...

How to prevent a HTTP link in asp....for the Name field,description field etc...

推荐答案

我想您想阻止您的用户输入 I guess you want to prevent your users from entering something like <a href="www.spammer">Great Spam</a>

进入页面的某些文本文件. 您可以尝试以下操作: -过滤掉任何<>通过JavaScript -过滤掉任何<>在后面的代码中或将其更改为& lt;等 -尝试使用正则表达式进行更精细的解析以检测链接

into some text fileds of your pages. There are some things you could try: - filter out any <> by JavaScript - filter out any <> in the code behind or change them to &lt; etc. - try some more elaborate parsing with regular expressions to detect links

更多推荐

在asp.net中阻止HTTP代码

本文发布于:2023-11-15 19:01:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1597125.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:代码   asp   net   HTTP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!