This is the page that really got my goat. I'll list the relevant parts here for ease of reading.
Allows a page to access the client OnSubmit event. The script should be a function call to client code registered elsewhere.
Ok, how many things can you find wrong with this simple example?
- string concatenating to make a script block
- a bunch of totally unrelated code that muddies the point
- document.write() - who does that?
- VB and C# code don't even match; C# includes the method declaration; VB only includes the method body
- scriptString += "/" + "script>"
- definition says "The script should be a function call to client code registered elsewhere." but that is not what the example code does
Here's my stab: