Command Buttons and Client Actions - Course ASP.NET 4 and Visual Studio 2010 - Lesson 7
In this video, we covered many concepts related to the button. First, we started with adding the ability to trigger the button by hitting then enter key. We did that by setting the defaultbutton property on the form. Then, we looked at the OnClientClick event that takes place when the user clicks on the button, but on the client side (before the form has been submitted to the server). We added JavaScript code in this event that displays some information from the form. After that, we added an event on the button that ASP.NET does not understand, but the browser does. We used onmouseover and added some JavaScript code to change the background color of the form when the user hovers over the button. Finally, we covered the command name and the command arguments that we can use when we have many buttons on the page and we need to know which button was clicked by the user.