Duration: 22 minutes
Summary: 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.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: ASP.NET and Visual Studio 2010
Keyword: ASP.NET 4, Visual Studio 2010, default button, onClientClick, onmouseover, getElementById, document, bgColor, CommandName, CommandArgument, OnCommand.