From the course: Blazor WebAssembly: Building Your First App
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Event handling - Blazor Tutorial
From the course: Blazor WebAssembly: Building Your First App
Event handling
- Event handling allows you to perform an action when an event has occurred. This often happens when a button has been clicked. But there are many other instances where event handling can occur such as changing the value in a text box or toggling a check box. It can be set up using a function in the code snippet of a razor component. From there you bind the function to an event within your component. A typical example of event handing is when a form has been submitted. The information that the user has keyed in would have to be stored somewhere. And this is a good example of using event handling. On the product details page, I have a problem. I would try to add an item to the shopping cart. However, when I click on the button it doesn't seem to be working. The quantity is not being reset. If I go into the shopping cart page, I can see that the product has not been added. In order to fix this I need to add event…
Contents
-
-
-
-
-
(Locked)
Create a Razor component4m 15s
-
(Locked)
Code blocks4m 7s
-
(Locked)
Parameters6m 23s
-
(Locked)
Other directives5m 50s
-
(Locked)
Data binding3m 34s
-
(Locked)
Event handling3m 55s
-
(Locked)
Built-in components5m 44s
-
(Locked)
Challenge: Basic web application4m 27s
-
(Locked)
Solution: Basic web application5m 27s
-
(Locked)
-