简体   繁体   English

如何在Web浏览器中禁用网站URL?

[英]How to Disable Website URL in a Web browser?

I want that any user doesn't edit my website URl. 我希望任何用户都不要编辑我的网站URl。

mean that when user login in myWebsite then he/she is on studenthome.aspx and the URL(www.XXXXXX.com/studenthome.aspx) not editable. 表示当用户登录myWebsite时,他/她位于studenthome.aspx上,并且URL(www.XXXXXX.com/studenthome.aspx)不可编辑。

This issue when i search on internet and getting the result in javascript code but i want c# code. 当我在Internet上搜索并以javascript代码获取结果但我想要c#代码时会出现此问题。 thanks 谢谢

像那样

C# is used as server side language you cannot access users' browser functionalities with C#. C#用作服务器端语言,您无法使用C#访问用户的浏览器功能。 You need to use a client side language (JavaScript) to do so. 您需要使用客户端语言(JavaScript)来执行此操作。

If you got code in javascript, you can write in c# using ScriptManager.RegisterStartupScript(this,typeof(Page), "key", "your script", true); 如果您使用JavaScript获取代码,则可以使用ScriptManager.RegisterStartupScript(this,typeof(Page), "key", "your script", true);用c#编写ScriptManager.RegisterStartupScript(this,typeof(Page), "key", "your script", true); Anyhow this appears in web browser.To encrypt , you can use any Script Encoder tool to encode your JavaScript. 无论如何,它都会出现在Web浏览器中。要进行加密,您可以使用任何脚本编码器工具对JavaScript进行编码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在网站中使用 jquery/javascript 检测从 web 浏览器(chrome)或 webview(移动应用程序)打开的 url? - How to detect the url opening from web browser(chrome) or webview(mobile app) using jquery/javascript in the website? 如何在Web应用程序的浏览器上禁用按钮关闭? - How To Disable Button Close On Browser For Web Application? 如何在Chrome浏览器中禁用Web应用程序 - How to disable web application in chrome browser 如何防止在网络浏览器中的网站上进行屏幕录制? - how to prevent screen recording on a website in a web browser? 如何通过 Chromium 浏览器禁用网站上的按钮四舍五入? - How can I disable the rounding of buttons on a website through a Chromium browser? 在网站的浏览器上检测到JavaScript禁用 - Detection of javascript disable on a browser for a website 如何在 Flutter Web 中禁用默认浏览器快捷方式? - How do I disable Default Browser Shortcuts in Flutter Web? 从浏览器禁用 Url 栏 - Disable Url Bar from Browser 如何在C#中的Web浏览器控件中禁用特定的javascript文件 - How to disable a specific javascript file in Web Browser control in C# CORS 插件 / --disable-web-security 如何在浏览器上工作? - How does CORS plugin / --disable-web-security work on browser?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM