禁用ASP.NET中的页面保存 [英] Disable page saving in ASP .NET

查看:73
本文介绍了禁用ASP.NET中的页面保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何禁用ASP.NET C#中的页面保存?

防止在浏览器的文件菜单中单击保存.

How can i disable page save in asp .net C#?

Prevent clicking save from file menu in browser

推荐答案

页面保存是浏览器的功能.您无法从网页上控制浏览器功能.
The page save is a feature of the browser. You cannot control browser features from your web page.


您可以禁用或替换上下文菜单,但是内置菜单是浏览器的一部分,您几乎无法控制如何它起作用.我没有办法删除实际菜单或阻止键盘快捷键激活它.

尽管您无法阻止打印,但您可以使用CSS来控制使用@media print http://www.w3schools.com/css/css_mediatypes.asp [ ^ ]
You can disable, or replace, the context menu but the built-in menus are a part of the browser and you very little control over how it functions. There is no way that I know of to remove the actual menu or prevent the keyboard shortcuts to activate it.

Although you can''t prevent the printing you may be able to use CSS to control what is shown using @media print http://www.w3schools.com/css/css_mediatypes.asp[^]


这篇关于禁用ASP.NET中的页面保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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