how to call child component method from parent component in blazor?

First you need to capture a reference of your child component: <ChildComponent @ref=”child” /> Then you can use this reference to call the child’s component methods as you do in your code. <button onClick=”@ShowModal”>show modal</button> @code{ ChildComponent child; void ShowModal(){ child.Show(); } } The namespace of your component need to be added by a using … Read more