Blazor component needs to modify value of parent component
问题 I have these two components in my Blazor app: Component1.razor: <CascadingValue Value=this> <Component2/> </CascadingValue> <p>@DisplayedText</p> @code { public string DisplayedText = string.Empty; } Component2.razor: <button @onclick=@(e => { C1.DisplayedText = "testing"; })>Set DisplayedText</button> @code { [CascadingParameter] public Component1 C1 { get; set; } } When I click the "Set DisplayedText" button, the text in the p element in Component1 should change to testing , but it does not