Update data in partial view I have partial view which update data on server.
Partial view contains list of configurations (can be check box or text box depends on type).
This code is working, and I would like to know how to implement this better.

Main question is related to "@Html.HiddenFor".
Is this correct way to implement update?
Without "@Html.HiddenFor" my model data is not ok.

Action:

  public async Task&lt;IActionResult&gt; UpdateConfiguration(List&lt;ConfigurationModel&gt; configurations)
        {
            logger.LogInformation("Update configurations");

            using (var client = new HttpClient())
            {
                SetToken(client, this.HttpContext);
                var configUrl = Helper.GetUrlManagerApi(env, "Configuration");
                var response = await client.PutAsync(configUrl, configurations.ToJson());
                HandleResponseError(response, logger);
                return RedirectToAction("Index", "Home");
            }
        }


Partial view:

@using Microsoft.EntityFrameworkCore.Metadata.Internal
@using Bluebox.Common.Models
@using Bluebox.Common.Helper
@using Microsoft.AspNetCore.Mvc.Localization
@using SettingsApp.Models;

@inject IViewLocalizer Localizer
@model List&lt;ConfigurationModel&gt;

@using (Html.BeginForm("UpdateConfiguration", "ManagerSettings"))
{
    &lt;table class="table table-hover table-striped"&gt;
        &lt;thead class="h2-table"&gt;
            &lt;tr&gt;
                &lt;th&gt;@Localizer["Property"]&lt;/th&gt;
                &lt;th&gt;
                    @Localizer["Edit"]
                &lt;/th&gt;
            &lt;/tr&gt;
        &lt;/thead&gt;
        @for (var i = 0; i &lt; Model.Count(); i++)
        {
            &lt;tr&gt;
                &lt;td&gt;
                    @Localizer[Model[i].LocalizeId.ToString()]
                    @Html.HiddenFor(model =&gt; model[i].Id, @Model[i].Id)
                    @Html.HiddenFor(model =&gt; model[i].LocalizeId, @Model[i].LocalizeId)
                    @Html.HiddenFor(model =&gt; model[i].Key, @Model[i].Key)
                    @Html.HiddenFor(model =&gt; model[i].Type, @Model[i].Type)
                &lt;/td&gt;
                &lt;td&gt;
                    @if (Model[i].Type == PropertyType.Boolean)
                    {
                        @Html.CheckBoxFor(model =&gt; model[i].ValueBool, Model[i].Value == "true")
                    }
                    else if (Model[i].Type == PropertyType.Number)
                    {
                        @Html.TextBoxFor(model =&gt; model[i].ValueNum, new { style = "width:50px;", @type = "number" })

                    }
                    else if (Model[i].Type == PropertyType.Text)
                    {
                        @Html.TextBoxFor(model =&gt; model[i].Value, new { style = "width:250px;" })

                    }
                &lt;/td&gt;
            &lt;/tr&gt;
        }
    &lt;/table&gt;
    &lt;div&gt;
        &lt;input type="submit" class="button" value='@Localizer["Update"]' /&gt;
    &lt;/div&gt;
}


Result:
The most problem in "@Html.HiddenFor" is that users may change this value by means of a browser developer window or CSRF, for avoiding last one you can use 

@Html.AntiForgeryToken()


You can protect your application from adverse changes if you will reread all hidden properties such as LocalizeId, Key and Type from your data source before applying user's changes.