I have two razor pages: one embedded into the other. I want to bind an inner property to an outer property.
All I get, when I start the app, is an exception
Object of type 'BlazorApp2.Components.Controls.DismissibleAlert' does not have a property matching the name 'bind-Message'
My outer page:
@page "/"@using BlazorApp2.Components.Controls<PageTitle>Home</PageTitle><h1>Hello, world!</h1><br/>@Message<br/><DismissibleAlert bind-Message="@Message"></DismissibleAlert><button @onclick="DoWhatIMean" class="btn btn-info" >Change Text</button>@code{ private void DoWhatIMean() => Message = "You clicked the button!"; [Parameter] public string Message { get; set; } = "Default Message";}The DismissibleAlert looks like this:
<h3>DismissibleAlert</h3>@Message<button type="button" class="btn-close" @onclick="Dismiss"></button><br/>@code { [Parameter] public string Message { get; set; } = string.Empty; [Parameter] public EventCallback<string> MessageChanged { get; set; } public async Task Dismiss() { Message = string.Empty; await MessageChanged.InvokeAsync(); }}I'm running out of ideas why this does not run... I really appreciate your tips