Skip to content
Loading
  
  •                 class="col-3">  
  •                     for="NameGT" class="form-control badge-primary">Gas Tester  
  •                     for="GasTesting.NameGT" class="form-control" style="font-size:9px" />  
  •                   
  •                 class="col-3">  
  •                     for="EquipmentUsed" class="form-control badge-primary">Equipment Model & ID  
  •                     for="GasTesting.EquipmentUsed" class="form-control" style="font-size:9px" />  
  •                   
  •                 class="col-1">  
  •                     for="Oxygen" class="form-control badge-primary">Oxygen  
  •                     for="GasTesting.Oxygen" class="form-control" style="font-size:9px" />  
  •                   
  •                 class="col-1">  
  •                     for="LEL" class="form-control badge-primary">LEL  
  •                     for="GasTesting.LEL" class="form-control" style="font-size:9px" />  
  •                   
  •                 class="col-1">  
  •                     for="Toxic" class="form-control badge-primary">Toxic Gas  
  •                     for="GasTesting.Toxic" class="form-control" style="font-size:9px" />  
  •                   
  •               
  •             "submit" class="btn btn-link btn-sm border-primary mb-2 mt-2" value="Save Data" />  
  •           
  •           
  •         class="tab-c">  
  •             "GasTest" />  
  •           
  •       
  •     "IsoCert" class="tab-pane fade">  
  •         

    Isolation Certificate

      
  •       
  • How do I fit this in the javascript? For each tab
     
    Second issue. My partial view looks like
     
    1. @page  
    2. @model Test.Test3Model  
    3.   
    4.   
    5. class="row no-gutters">  
    6.     class="col-3">  
    7.         for="DateGT" class="form-control badge-primary">Gas Testing Date  
    8.         class="form-control" style="font-size:12px">@Html.DisplayFor(model => model.GasTesting.DateGT)  
    9.     
      
  •     class="col-3">  
  •         for="NameGT" class="form-control badge-primary">Gas Tester  
  •         class="form-control" style="font-size:12px">@Html.DisplayFor(model => model.GasTesting.NameGT)  
  •     
  •   
  •     class="col-3">  
  •         for="EquipmentUsed" class="form-control badge-primary">Equipment Model & ID  
  •         class="form-control" style="font-size:12px">@Html.DisplayFor(model => model.GasTesting.EquipmentUsed)  
  •       
  •     class="col-1">  
  •         for="Oxygen" class="form-control badge-primary">Oxygen  
  •         class="form-control" style="font-size:12px">@Html.DisplayFor(model => model.GasTesting.Oxygen)  
  •       
  •     class="col-1">  
  •         for="LEL" class="form-control badge-primary">LEL  
  •         class="form-control" style="font-size:12px">@Html.DisplayFor(model => model.GasTesting.LEL)  
  •       
  •     class="col-1">  
  •         for="Toxic" class="form-control badge-primary">Toxic Gas  
  •         class="form-control" style="font-size:12px">@Html.DisplayFor(model => model.GasTesting.Toxic)  
  •       
  •   
  •  
     
    And OnPost procedure
     
    1. public async Task OnPostUpdateGasTestAsync()  
    2.         {  
    3.   
    4.             if (!ModelState.IsValid)  
    5.             {  
    6.                 return Page();  
    7.             }  
    8.   
    9.             var newGT = new GasTesting();  
    10.             if (await TryUpdateModelAsync(newGT, "GasTesting",   
    11.                     c => c.PTWNo,     
    12.                     c => c.DateGT,  
    13.                     c => c.NameGT,  
    14.                     c => c.EquipmentUsed,  
    15.                     c => c.Oxygen,  
    16.                     c => c.LEL,  
    17.                     c => c.Toxic))  
    18.             {  
    19.                 _context.GasTestings.Add(newGT);  
    20.                 await _context.SaveChangesAsync();  
    21.                 return Partial("Test/GasTest");  
    22.             }  
    23.   
    24.             if (newGT == null)  
    25.             {  
    26.                 return NotFound();  
    27.             }  
    28.   
    29.               
    30.   
    31.             return Partial("Test/GasTest");  
    32.         }  
     But when I run it I get
     
     
     
    I deliberatly have no query, just to make sure it is working 
    +2