http://en.wikipedia.org/wiki/Konami_Code
I already done this using full javascript but how can i do this in C#/asp.net website (not winform). thanks..
Super C (NES) – Entering the code( → ← ↓ ↑ A B Start ) before the title screen appears, gives the player 10 lives in the US version of the game while in the Japanese version the code gives 30 lives.
Up, Up, Down, Down, Left, Right, Left, Right, B, A. It's called the Konami Code, and it often meant the difference between life and death in a video game back in the 1980s. Perform those button presses in the right sequence, and you'll unlock cheats that help you win.
So you mean the user should not find out about your ultra secret konami code when viewing the source?
It's not possible to do it entirely server-side, unless you want a postback on every keystroke, which is awkward.
You could compress and obfuscate the javascript, but I guess a user with a strong determination still can figure it out.
You could use Silverlight, but again, a user with a strong determination can unpack the XAP from the browser cache and view your DLLs in reflector.
What you could do is sending every keystroke to the server using AJAX (or maybe collect them client-side and send them in a batch), which is actually not that painfully slow. On the server you'd have to analyse the keystrokes. This code will not be visible to the user. You'd then have to simulate some push mechanism to trigger your desired reaction on the client side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With