So, you mean that the user should not learn about your secret code by cones when viewing the source?
It is not possible to do this completely on the server side unless you need a postback every time you press a key, which is inconvenient.
You can compress and obfuscate javascript, but I think a user with a strong definition can still figure it out.
Silverlight, XAP DLL .
, AJAX (, , ), . . . push, .