System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=SmartInvoice StackTrace: at SmartInvoice.Pages.Master.Pages_Master_Index1.<ExecuteAsync>d__9.MoveNext() in C:\Users\LENOVO\source\repos\SmartInvoice\SmartInvoice\Pages\Master\Index1.cshtml:line 39
1 @page 2 @model SmartInvoice.Pages.Master.IndexModel 3 @{ 4 } 5 6 7 <h2>Invoices</h2> 8 9 <form method="post"> 10 <div class="form-group"> 11 <label for="sportsman">Sportsman:</label> 12 <input type="text" class="form-control" id="sportsman" name="sportsmanAmount"> 13 </div> 14 <div class="form-group"> 15 <label for="general">General:</label> 16 <input type="text" class="form-control" id="general" name="generalAmount"> 17 </div> 18 <div class="form-group"> 19 <label for="temporary">Temporary:</label> 20 <input type="text" class="form-control" id="temporary" name="temporaryAmount"> 21 </div> 22 <button type="submit" class="btn btn-primary">Submit</button> 23 </form> 24 25 <br> 26 27 <h2>List of Invoices</h2> 28 29 <table class="table"> 30 <thead> 31 <tr> 32 <th>Sportsman</th> 33 <th>General</th> 34 <th>Temporary</th> 35 <th>Action</th> 36 </tr> 37 </thead> 38 <tbody> 39 @foreach (var invoice in Model.Invoices) 40 { 41 <tr> 42 <td>@invoice.Sportsman</td> 43 <td>@invoice.General</td> 44 <td>@invoice.Temporary</td> 45 <td> 46 <a class="btn btn-primary btn-sm" href="/Edit?id=@invoice.Id">Edit</a> 47 <a class="btn btn-danger btn-sm" href="/Delete?id=@invoice.Id">Delete</a> 48 </td> 49 </tr> 50 } 51 </tbody> 52 </table>
Model.Invoices
null
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)