title: C# Razor pages Partial View Model is null on submit
body: <p>I am new to Razor pages and trying to create a page with a partial view. The partial view has a dropdownlist and a text input for Quantity field and a submit button. The Partial View renders correctly but when I click on the Submit button the Model passed to the Code behind has no value.</p>
  
  <p>Here is the code I have </p>
  
  <p>_PartialAddons.cshtml</p>
  
  <pre><code>@*
      For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
  *@
  @{
  }
  @model Public.Areas.Register.AddonListDto
  &lt;form method="post"&gt;
      @Html.HiddenFor(Model =&gt; Model.Quantity)
      &lt;div style="padding:5px;"&gt;
          &lt;b&gt;NZD $45&lt;/b&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;div style="padding:5px;"&gt;
              &lt;select id="skuSelect" asp-for="SelectedSkus" asp-items="@(new SelectList(Model.AddonSkus,"SkuId","SkuName"))" class="form-control"&gt;
                  &lt;option&gt;Please select one&lt;/option&gt;
              &lt;/select&gt;
          &lt;/div&gt;
  
          &lt;div style="padding:5px;"&gt;
              &lt;input type="hidden" name="handler" value="Quantity" /&gt;
              &lt;input asp-for="Quantity" name="Quantity" class="form-control ng-untouched ng-pristine ng-valid" max="999" min="0" style="width:150px;" type="number" value="0" id="@Model.Id"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div style="padding:5px;"&gt;
          &lt;a class="btn green" asp-page-handler="AddToCart"&gt;Add to Cart&lt;/a&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is the Main Page</p>
  
  <pre><code>@foreach (var addons in Model.StoreAddonList)
                  {
                      &lt;div class="panel card panel-default" style="margin-top:10px;"&gt;
                          &lt;div class="panel-heading card-header" role="tab"&gt;
                              &lt;div class="panel-title"&gt;
                                  &lt;div class="accordion-toggle" role="button" aria-expanded="true"&gt;
                                      &lt;div accordion-heading="" style="width:100%;"&gt;
                                          @addons.Title
                                          &lt;i class="pull-right float-xs-right glyphicon glyphicon-chevron-down"&gt;&lt;/i&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="panel-collapse collapse in show" role="tabpanel" style="overflow: visible; height: auto; display: block;" aria-expanded="true" aria-hidden="false"&gt;
                              &lt;div class="panel-body card-block card-body"&gt;
                                  &lt;div style="padding-top:10px;background-color:#ffffff;clear:both;"&gt;
                                      &lt;div style="width:100%"&gt;
                                          &lt;div style="float:left;width:20%;text-align:left;"&gt;
                                              Name
                                          &lt;/div&gt;
                                          &lt;div style="float:left;width:30%;padding-left:10px;"&gt;
                                              @addons.Description
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div style="float:left;width:40%;padding-left:10px;"&gt;
                                          &lt;div&gt;
                                              @{
                                                  await Html.RenderPartialAsync("_PartialAddons.cshtml", addons);
                                              }
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div style="clear:both;"&gt;
                                          &amp;nbsp;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  }
  </code></pre>
  
  <p>This is the Index.cshtml.cs to handle the submit</p>
  
  <pre><code>public ActionResult OnGetAddToCart(AddonListDto addOnList)
  {
      var sass = Quantity;
      var tass = SelectedSkus;
  
      return null;
  }
  </code></pre>
  
  <p>The AddonListDto is null on the OnGetAddToCart Method. Have been trying to get this working for the past two days. Any help would be greatly appriciated</p>