Loading...

CascadingBag


CascadingBag Example

Please enter a value.



@inherits ControlComponent
<p>Please enter a value.</p>
<asp.TextBox @bind-Text="this.Text"></asp.TextBox>
<br />
<br />
<CascadingBagChild />
@code {
                                            public string Text
    {
                                            get
        {
                                            return this.CascadingBag.Text;
        }
                                            set
        {
                                            this.CascadingBag.Text = value;
        }
    }
}
CascadingBagChild.razor
@inherits ControlComponent
<asp.Label @bind-Text="this.Text"></asp.Label>
@code {
    [CascadingParameter(Name = "Text")]
                                            public string Text { get; set; }
}
Copyright © 2024 Jurio li All rights reserved.
An unhandled error has occurred. Reload 🗙