我如何...阻止在mvc .net中的地址栏中输入网址? [英] How do I...prevent url input in addressbar in mvc .net ?
本文介绍了我如何...阻止在mvc .net中的地址栏中输入网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请告诉我如何防止在mvc .net中的地址栏中输入网址?我想在地址栏中写入/粘贴网址,然后显示前一个网址没有当前网址。例如
localhost:8080 / home / index这是主要网址。
如果我想要粘贴在地址栏中的url下面
localhost:8080 / home / profile然后你不能粘贴url。我可以这样做吗?
Please tell me how to prevent url input in addressbar in mvc .net ? I f i want to write / paste url in address bar then previous url shown there not current url . For example
localhost:8080/home/index which is main url.
if i want to paste below url in the address bar
localhost:8080/home/Profile then u can't paste the url .how can i do that?
推荐答案
您无法控制浏览器URL中的数据或锁定地址栏。
客户端浏览器可以控制它。
您可以尝试在某些情况下重定向URL - https://support.microsoft.com/kb/324000/ [ ^ ]。
You cannot control data in a browser's URL or lock the address bar.
The client browser has control on it.
What you can try is redirect the URL in some circumstances - https://support.microsoft.com/kb/324000/[^].
这篇关于我如何...阻止在mvc .net中的地址栏中输入网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文