Sujeet Raman

Sujeet Raman

  • 862
  • 927
  • 353.9k

how to update list item using textbox in blazor webassembly

Feb 2 2023 8:49 AM

I have to update name of an item which is displayed in card.I need to update the name and send to data base how i can do?

   <MudGrid Spacing="@spacing" Justify="Justify.Center">
    @foreach (var item in FileList)
    {
     <MudItem xs="4" Style="display:flex;" >
                <MudCard Height="350px" Width="300px">
                    <MudCardMedia Image="images/door.jpg" Height="200" />
                    <MudCardContent>
////how to upate below name feild and that should be updated in list also
                          <MudTextField @bind-Value="@item.FileNameWithoutExtension" Label="Name" Variant="Variant.Text" Margin="Margin.Dense"></MudTextField>
                          <MudText Class="textsilver" Typo="Typo.body2">@item.Name</MudText>
                    </MudCardContent>
                  
                </MudCard>
            </MudItem>
     }

     </MudGrid>

 


Answers (3)