Closed donhuvy closed 4 years ago
You didn't create an instance of ExampleModel
for your exampleModel
.
private ExampleModel exampleModel { get; set; } = new ExampleModel();
... or assign it to exampleModel
on OnInitializedAsync
.
@guardrex - What a really obscure exception message.. Thanks!
Wow ..... yeah ... that number of :+1: means that devs are hitting this one BIG TIME.
It needs special attention in the topic to avoid more 🤕 pain 🤕.
Who can help me?
This Delete Page working well, but if for testing I want to delete the not existing row Id, I got the same issue
@page "/IndOrg/ContactDelete/{CurrentID}" @inject ContactController objContactController
<AuthorizeView Roles="@admSer.GetRolesList("ContactDelete")" Context="authContext" >
@code{ [Parameter] public string CurrentID {get;set;} Contact objContact= new Contact(); private bool readonlyMain1 {get;set;}=false;
protected override void OnInitialized()
{
readonlyMain1=AppData.readonlyMain1;
objContact = objContactController.GetContactById(Convert.ToInt32(CurrentID));
}
protected void DeleteContact(){
objContactController.DeleteContact(objContact);
NavManager.NavigateTo("/IndOrg/ContactViewStd/"+AppData.Individual_IdSelect);
}
void Cancel(){
NavManager.NavigateTo("/IndOrg/ContactViewStd/"+AppData.Individual_IdSelect);
}
}
@khayol ... We don't have the staffing to provide product support. Open your question on one or more of the open dev support forums out there, such as ...
var model = new BlazorTable
var cut = RenderComponent<EditForm>(parameters => parameters.Add(p => p.Model, model));
I am using .NET Core 3.0.100 , Blazor Server web-app, Microsoft Visual Studio 2019 Community Preview.
I follow this guide https://docs.microsoft.com/en-us/aspnet/core/blazor/forms-validation?view=aspnetcore-3.0
File
ExampleModel.cs
and file
Foo.razor
I go to https://localhost:44333/foo
error
Raw exception detail
Maybe related to this content https://github.com/aspnet/AspNetCore/issues/11331#issuecomment-523553225
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.