Hello. I am trying to use the RadzenUpload in a form so the user can specify the parameters and then upload them to a database. This is the code I did:
public async Task prepEditBrigadists()
{
var result = await DialogService.OpenAsync("Editar brigadista", ds =>
@
<RadzenNumeric @bind-Value="@idEmployee" />
<RadzenDropDown @bind-Value="areaId" Data="areas" TextProperty="@nameof(areasBrigades.AreaName)" ValueProperty="@nameof(areasBrigades.AreaId)"
Change="@(async()=>await OnSelectionChanged())" Style=@($"box-shadow: 0 0 10px 2px {selectedAreaColor}") />
<RadzenUpload @ref="upload" Auto="false" Multiple="false" Accept="image/*" Url=@($"edit/{idEmployee}/{idArea}/{u.UserTress}/{plantId}") class="w-100" />
<RadzenButton ButtonStyle="ButtonStyle.Primary" Text="Añadir" Click=@(args => upload.Upload()) />
);
}
I do not know if is because the radzen upload and then the url are rendered at the same time but as the areaId and idEmployee are 0 at first, whenever I hit the button with these values changed, in the controllers those values are still 0. I do not know if there is a better way to achieve this or if it is possible. I want the values of the url to change as I change them in the RadzenNumeric and the DropDown. I initially tried with only upload a photo with one predefined parameter and worked perfectly but with this scenario it has been a bit chaotic.
I am using Blazor Web App in .net 8
Thank you so much for your support.