I don't think you can prevent your users from viewing the source code of your site, as it is the document that browsers use to render the page. So, if the page is fully viewable to the user, the source code is fully accessible.
Those tricks are so easliy gotten around (View Frame Source in FF, or simply disable all Javascript and now you can right-click again) that all they are good for is bloating your page. To the OP: Just be very careful not to put anything online that you don't want people to see. As $earner said, anything you want a browser to show means the browser needs access to it. If the browser has access, the person using the browser does too. It's just the way it is. There are tons of scripts out there to hide stuff from people. They are all easily disabled because all one has to do is disable scripts. Period. For images, the best you can do is watermarking and having the online version a slightly crappier resolution while the good version stays offline. Those of us who are good at image-editing software can still usually remove watermarks if we want to put the work into it, but that's about the best you can do. Remember, everything you put online is PUBLIC. That's just how teh Interwebz works.
You can do it using javascript , however user can always disable javascript and view source , rather encrypt the page and use javascript.write("....") .
like stomme said...if they have access to it in their browser they can read the source...there isn't much you can do about it. What's in your source that you don't want people being able to see? maybe someone could help if they had a direction to start looking in?
view source is a completely client side command - only way to stop it is scripts, which can be turned off... i suggest just writing "copying any part of this website is against our terms and conditions" in a pop-up window when someone right clicks, won't stop them but will be a big bonus if your taking someone to court for copyrighting
There's no way to hide the html code. you can also use No Right-Click script or scramble your html code with this html encoder http://www.auditmypc.com/html-encoder.asp
The question is, why do you want to? Even if you could stop people seeing the source code then people can just take a screenshot and write their own HTML to make the identical page and nick the graphics from the screenshot. If you are trying to stop people seeing a formula for a calculation or such then the real option is to put that formula serverside and use a postback rather than doing it client side - hides your calculations but increases traffic/ response time - up to you which is more important.