My registration view doesnt post the input

My registration view doesnt post the input

I'm trying to do a login and register view with c#, html and MVC. First of all, I have a table in my database called "Usuarios" with columns like: Username, Contrasena (Password), Email, etc). When i fill all the text boxes to test if my controller update my database (adding the new user) it doesnt work.

I'm trying to do a login and register view with c#, html and MVC. First of all, I have a table in my database called "Usuarios" with columns like: Username, Contrasena (Password), Email, etc). When i fill all the text boxes to test if my controller update my database (adding the new user) it doesnt work.

My RegisterClient() method in ClientController:

[HttpPost]
        [AllowAnonymous]
        public ActionResult RegisterClient(RegisterViewModel model)
        {

        if(ModelState.IsValid)
        {
            Cliente Client = new Cliente(model.NombreUsuario, model.Password, model.Nombre, model.Apellido, model.Domicilio, model.TipoDoc, model.NumeroDoc, model.Telefono);

            using (var db = new ContextoDB())
            {

                if (db.Usuarios.Any(u => u.NombreUsuario == Client.NombreUsuario))
                {
                    ViewBag.DuplicateMessage = "Nombre de usuario en uso.";
                    return View("RegisterClient", model);
                }

                db.Usuarios.Add(Client);
                db.SaveChanges();
            }
            ModelState.Clear();
            ViewBag.SuccessMessage = "Registado excitosamente!";

            return RedirectToAction("RegistrationSuccess", "Account");
        } else
        {
            return View(model);
        }


    }

The RegisterClient View:

<div class="register-box">
            <h4 class="h4-header">Registro paso 2 de 2 </h4>

        @Html.ValidationSummary(true, "Register failed. Check your login details.")
        &lt;fieldset class="fieldset-box client-field"&gt;

            &lt;div class="user-info-box"&gt;
                &lt;h3&gt; Datos de la cuenta&lt;/h3&gt;
                &lt;div class="editor-field"&gt;
                    @Html.TextBoxFor(model =&gt; model.NombreUsuario, new { Class = "YourBackgroundClass", Placeholder = "Usuario" })
                    @Html.ValidationMessageFor(model =&gt; model.NombreUsuario, "", new { @class = "text-danger" })
                &lt;/div&gt;

                &lt;div class="editor-field"&gt;
                    @Html.TextBoxFor(model =&gt; model.Email, new { Class = "YourBackgroundClass", Placeholder = "Email" })
                    @Html.ValidationMessageFor(model =&gt; model.Email, "", new { @class = "text-danger" })
                &lt;/div&gt;

                &lt;div class="editor-field"&gt;
                    @Html.PasswordFor(model =&gt; model.Password, new { Class = "YourBackgroundClass", Placeholder = "Contraseña" })
                    @Html.ValidationMessageFor(model =&gt; model.Password, "", new { @class = "text-danger" })
                &lt;/div&gt;

                &lt;div class="editor-field"&gt;
                    @Html.PasswordFor(model =&gt; model.ConfirmPassword, new { @class = "YourBackgroundClass", Placeholder = "Confirmar contraseña" })
                    @Html.ValidationMessageFor(model =&gt; model.ConfirmPassword, "", new { @class = "text-danger" })
                &lt;/div&gt;

            &lt;/div&gt;

            &lt;div class="personal-info-box"&gt;
                &lt;h3&gt; Datos personales&lt;/h3&gt;
                &lt;div class="editor-field"&gt;
                    @Html.TextBoxFor(model =&gt; model.Nombre, new { Class = "YourBackgroundClass", Placeholder = "Nombre" })
                &lt;/div&gt;

                &lt;div class="editor-field"&gt;
                    @Html.TextBoxFor(model =&gt; model.Apellido, new { Class = "YourBackgroundClass", Placeholder = "Apellido" })
                &lt;/div&gt;
                &lt;div class="editor-field"&gt;
                    @Html.TextBoxFor(model =&gt; model.Domicilio, new { Class = "YourBackgroundClass", Placeholder = "Domicilio" })
                &lt;/div&gt;
                &lt;div class="editor-field"&gt;
                    @Html.TextBoxFor(model =&gt; model.Telefono, new { Class = "YourBackgroundClass", Placeholder = "Telefono" })
                &lt;/div&gt;

                &lt;div class="editor-field"&gt;
                    @Html.TextBoxFor(model =&gt; model.NumeroDoc, new { Class = "YourBackgroundClass", Placeholder = "Numero de documento" })
                &lt;/div&gt;
            &lt;/div&gt;

        &lt;/fieldset&gt;

        &lt;form action="" method="post"&gt;
            &lt;input type="submit" class="but-next next round" name="upvote" value="&amp;#8250;" /&gt;
        &lt;/form&gt;

        &lt;a href="#" class="but-next next round"&gt;&amp;#8250;&lt;/a&gt;
    &lt;/div&gt;

When i fill all the boxes, it triggers the validation messages.

c-sharp html

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Know Everything About HTML With HTML Experts

HTML Assignment Help Australia @30% OFF from Sample Assignment, with Our Best HTML assignment help experts. Get HTML homework help online at affordable price. 100% Plag free assignment solution.

C. C++. C#. 차이점 알려드림. 5분 순삭. Explain C.C++.C#. Like I'm Five

C. C++. C#. 차이점 알려드림. 5분 순삭. Explain C.C++.C#. Like I'm Five. 아시죠? C는 C++.C# 줄인말이 아니라는거?

Dicey Issues in C/C++

C/C++ problems. If you are familiar with C/C++then you must have come across some unusual things and if you haven’t, then you are about to. The below codes are checked twice before adding, so feel free to share this article with your friends.

Learn how to perform CRUD operations using C Sharp

QuickStart: CRUD Operations in C Sharp. Learn how to perform CRUD operations using C Sharp for MongoDB databases.

Loops in C++ | For, While, and Do While Loops in C++

In this Video We are going to see how to use Loops in C++. We will see How to use For, While, and Do While Loops in C++.