Hi,
I would like to use Htlm editor as below
<RadzenHtmlEditor @bind-Value=@developers.Description style="height: 200px; margin-bottom: 1rem;" UploadUrl="upload/image" />
<RadzenButton Icon="check" ButtonStyle="ButtonStyle.Success" Variant="Variant.Flat" Size="ButtonSize.Medium" Click="@((args) => SaveDescription(developers))" />
@code{
...
async Task SaveDescription()
{
await client.PostAsJsonAsync("api/etude", developers);
uriHelper.NavigateTo("etude");
}
}
I don't undertand whey the the database is not populate with the value @develoeprs.Description
put in HtmlEditor .
Have you any idea?
Thanks in advance
What happens when you debug your code?
I am afraid I don't understand this message. I suggest you put a breakpoint in the SaveDescription message and inspect the contents of developers
.
I agree with you it'll find if I can a beakpoint but I have this message so it can't run my app.
Your method SaveDescription doesn't have a parameter but you use it as if it has.
Click="@((args) => SaveDescription(developers))"
async Task SaveDescription()
Please pay attention to such details - they are C# basics. You have to invoke a method with the right number and type of arguments.
You have to invoke a method with the right >number and type of arguments.
I'm not sure sure to understand?
Check the declaration of the SaveDescription method (without parameters) and how you call it (with parameters). You should not call it with parameters:
Click="@((args) => SaveDescription())"
This issue is unrelated to Radzen.Blazor components and is beyond the scope of the forum. Please be warned that we may not reply to such issues in the future as we consider them generic C#/Blazor knowledge.
thanks to your suggestion. I'll be careful next time!
Just a last question : you will see on the picture below that I try to put the a desrciption in Htlm editor and after that populate the DB.
I use the line below but I would like to know I can put the validation directly RadzenHtmlEditor or if there is always a function validation directly in RadzenHTML editor
<RadzenHtmlEditor @bind-Value=@developers.Description style="height: 200px; margin-bottom: 1rem;" UploadUrl="upload/image" />
<RadzenButton Icon="check" ButtonStyle="ButtonStyle.Success" Variant="Variant.Flat" Size="ButtonSize.Medium" Click="@((args) => SaveDescription())" />
I don't understand your question.
I would like to know if it's possible to add the button to validate the text and
populate db in the head of radzenhtmleditor