Adding new Tasks
Learn how to add new tasks to the database.
We'll cover the following...
We need to add the ability to add new tasks. We do this as follows:
- Open the
Index.razorfile. - Add the following markup before the
@foreachloop:
Press + to interact
<div class="d-flex col col-lg-3 mb-4"><input placeholder="Enter Task" @bind="newTask" /><button class="btn btn-success"@onclick="AddTask">Submit</button></div>
- Open the
TaskManager.Client.Pages/Index.razor.cs
Ask