Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6922797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:27:11+00:00 2026-05-27T10:27:11+00:00

this is a conceptual question. As far as I know, MVC has a stateless

  • 0

this is a conceptual question.

As far as I know, MVC has a stateless nature.
When I hit reload (F5) in my browser, the values I wrote or changed in the view, doesn’t go away nor get replaced by the original values from the model.

Does anyone know why is this happening?
I’m assuming that in the moment I reload the page, the modified “not submitted” values should dissapear.

My views are only razor code… I’m not working with web forms (I mean, there are NO .aspx pages in my application)


@model PruebaMVC.Models.DatosLINQ.OPERACION

@{
    ViewBag.Title = "Edit";
}

<h2>Editar Operación</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Operación</legend>

        @Html.HiddenFor(model => model.IDOperacion)

        <div class="editor-label">
            @Html.LabelFor(model => model.FechaOperacion, "Fecha de la Operación")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FechaOperacion)
            @Html.ValidationMessageFor(model => model.FechaOperacion)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Comision, "Comisión")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Comision)
            @Html.ValidationMessageFor(model => model.Comision)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Legajo, "Número de Legajo")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Legajo)
            @Html.ValidationMessageFor(model => model.Legajo)
        </div>

        <p>
            <input type="submit" class="formbutton" value="Guardar Cambios" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver al listado de Operaciones", "Index")
</div>

I hope not be inflicting any rule of the site by making a conceptual question. If I’m, please tell me, so I don’t do this again.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:27:11+00:00Added an answer on May 27, 2026 at 10:27 am

    ASP.NET MVC HTML helpers will use the values posted to recreate the form. If you want to ensure that your model’s values get pushed to your view, remove them from the model state in your controller.

    You can use either

    public ActionResult MyController (MyModel model)
    {
        if (ModelState.IsValid)
        {
            ModelState.Clear ();
        }
    
        return View (model);
    }
    

    or you can remove specific items you want to update

    public ActionResult MyController (MyModel model)
    {
        if (ModelState.IsValid)
        {
            ModelState.Remove ("PropertyNameToRemove");
        }
    
        return View (model);
    }
    

    I’m not sure where you’re doing the updating (either manually in the controller, or in the model itself) but you just have to remove any or all of the items from ModelState and they will be repopulated.

    See this question, as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ps: This is more of a conceptual question. I know this makes things more
This is a difficult and open-ended question I know, but I thought I'd throw
This is a conceptual question involving Hadoop/HDFS. Lets say you have a file containing
This is really just a conceptual question for me at this point. In Lisp,
This is more of a conceptual question than anything. I have a base class
I have an interesting situation here this time. This more of a conceptual question,
This is a conceptual question and I haven't been able to find the answer
This is more of a conceptual question. If it helps, lets say it falls
This is more of a conceptual question than an actual implementation and am hoping
This a conceptual question on how one would implement the following in Lisp (assuming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.