Its not at all possible to stop the end user to see ur html generated code.
however you can do one thing you can trap the right click event of mouse and flash a messagebox. it wud protect it in someway however intelligent user can take the help of menu bar to see the code.
the best and only way is to use server side scripting. if you waana hide your logic use ASP, JSP, CGI/Perl etc etc....
Nilesh..
Best Luck..
Nilesh