[英]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.