How to prevent to download the source code of page using File > Save as?
You can't. The page is effectively already being downloaded when you view it in the browser. If you want to protect the contents, you might be able to obfuscate the source, and depending on what you are doing you might be able to make the page non-functional once it has been downloaded (ie making some behavior of the page rely on an Ajax request to your server). But there will always be workarounds.
You cannot prevent this behavior. Even if you were to be able to prevent it in any particular browser, you are still delivering code content that browsers render for you, someone could just create a raw request and view the source.
As a note, this won't stop someone who is determined, but will certainly really slow them down.
Hide view source? - HTML & CSS, That shortcut is handled by the operating system. It never reaches the browser and so the browser has no opportunity to pass it to the web page How to disable the view source ? I would like to deploy an application page, but would like to disable the View Source feature so that the code will not be displayed. If possible, Can you prvide sample code ?