i have a problem with a form on visual studio using ASP.NET.

There is my form :

<div class="form-horizontal">
    <form method="post" action="/update">
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            @Html.LabelFor(model => model[0].idContrato, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model[0].idContrato, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model[0].idContrato, "", new { @class = "text-danger" })
        </div> ... <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />

When i execute and inspect it,the line : <form method="post" action="/update"> is changed into <form action="/home/Edit/010001" method="post" novalidate="novalidate"> where /home/Edit/010001 is the url of my page and 010001 the id of the contract i want to edit in my form.

So when i press the button validate, it refresh the page and nothing happen.

Any idea?

Related posts

Recent Viewed