如何防止asp.net中的url? [英] How to prevent url in asp.net?

查看:78
本文介绍了如何防止asp.net中的url?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在运行时我的页面中我在url中编辑了一些文本然后输入该页面是错误的。那么我该如何解决这个问题呢?



我也在网址中传递querystring。



提前谢谢。

解决方案

您在网址中输入的值不正确。因此你得到了错误。

你无法阻止用户修改网址。



你能做的最好是使用 UrlEncode [ ^ ]。

Hi In my page at run time i edit some text in url then enter that page is error. So how can i solve this problem?

I also passing querystring in url.

Thanks in advance.

解决方案

You are entering incorrect values in the url. Thus you get the error.
There is no way for you to prevent the user from modifying the url.

The best you can do is encode it by using UrlEncode[^].


这篇关于如何防止asp.net中的url?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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