We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ChildContent Context = another_name Ambiguity

I'm trying to implement CustomAuthenticationStateProvider. When Implementing AuthorizedView and Authorized I get this Error:  

Error (active) RZ9999 The child content element 'ChildContent' of component 'EditForm' uses the same parameter name ('context') as enclosing child content element 'Authorized' of component 'AuthorizeView'. Specify the parameter name like: '<ChildContent Context="another_name"> to resolve the ambiguity D:\Blazor Projects\EMRDispatch\EMRDispatch\Pages\Index.razor
I can't figure out how to resolve this.
My Edit form is inside a sfDialog:

 @*=====================Add Edit GL Dialog =========================*@
        <div class="container">
            <SfDialog @ref="DialogAddEditUserStaffingStatus" IsModal="true" Width="350px" ShowCloseIcon="true" Visible="false">
                <DialogAnimationSettings Effect="@AnimationEffect" Duration=400 />
                <EditForm Model="@AddEditUserStaffingStatus" OnValidSubmit="@UserAddEditSave">
                    <DataAnnotationsValidator />
                    <div style="padding:10px">
                        <SfTextBox Enabled="true" Placeholder="EMR Name"

                        <SfDropDownList DataSource="@staffing"
                                        Placeholder="Select Staffing"
                            <ValidationMessage style="font-size:0.7rem;" For="@(() => AddEditUserStaffingStatus.StaffingID)" />
                            <DropDownListFieldSettings Text="Staffing" Value="StaffingID"></DropDownListFieldSettings>
                            <DropDownListEvents TItem="StaffingModel" TValue="int" ValueChange="OnChangeStaffing"></DropDownListEvents>
                        <SfDropDownList DataSource="@status"
                                        Placeholder="Select Status"
                            <ValidationMessage style="font-size:0.7rem;" For="@(() => AddEditUserStaffingStatus.StatusID)" />
                            <DropDownListFieldSettings Text="Status" Value="StatusID"></DropDownListFieldSettings>
                            <DropDownListEvents TItem="StatusModel" TValue="int" ValueChange="OnChangeStatus"></DropDownListEvents>

                    <br />
                    <div class="e-footer-content">
                        <div class="button-container">
                            <button type="submit" class="e-btn e-normal e-primary" style="width:100px" disabled=@isSubmitting>Save</button>
                            <button type="button" class="e-btn e-normal e-danger" @onclick="@CloseDialogAddEdit" style="width:100px">Cancel</button>

Any Help is highly appreciated


4 Replies 1 reply marked as answer

OT oliver tejada February 24, 2023 04:53 AM UTC

Attached is my code below.

Attachment: code_133a4e96.7z

VJ Vinitha Jeyakumar Syncfusion Team February 24, 2023 01:47 PM UTC

Hi oliver,

We want to let you know that the reported issue occurs when we try to put an EditForm in an Authorize view and it is not because of the SfDialog Component. And the issue occurs because of the AuthorizeView and EditForm both use the same Context variable.
To avoid this you can change the variable name on them like below,

Code snippet:
<AuthorizeView Context="authContext">
        <EditForm Context="formContext">

Please refer to the below link for further reference,


Marked as answer

OT oliver tejada February 26, 2023 06:34 PM UTC

Thank you very much. I was surprised it was a simple fix. 

VJ Vinitha Jeyakumar Syncfusion Team February 27, 2023 04:58 AM UTC

Hi oliver,

We are glad to assist you.


Live Chat Icon For mobile
Up arrow icon