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

  • Home
  • SEARCH
  • 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 3341394
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:43:03+00:00 2026-05-18T00:43:03+00:00

I have 2 action methods: [HttpGet] public ActionResult Customize() { return View(new CustomizeViewModel {

  • 0

I have 2 action methods:

[HttpGet]
public ActionResult Customize()
{
  return View(new CustomizeViewModel { Thing1 = "test", Thing2 = "test" });
}

[HttpPost]
public ActionResult Customize(CustomizeViewModel customizeViewModel)
{
  _someService.DoSomething(customizeViewModel);

  ...
}

My ViewModel looks like:

public class CustomizeViewModel
{
  public string Thing1 { get; set; }
  public string Thing2 { get; set; }
  public string Thing3 { get; set; }
}

In my View, I have a textbox that collects a value for Thing3 and simply shows the values for Thing1 and Thing2. My problem is, when I POST and enter the POST version of the Customize method, I only get a value for Thing3 (the one that I typed into the textbox.) Is there any way to get the values I populated in the GET version of the Customize method to carry over? I tried UpdateModel() but that didn’t work.

  • 1 1 Answer
  • 1 View
  • 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-18T00:43:04+00:00Added an answer on May 18, 2026 at 12:43 am

    This is one of the things for which hidden input fields were created. Store the values in there using HiddenFor in the View and you should be set. The only data that will come along for the ride in the HTTP POST version are form-input elements.

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

Sidebar

Related Questions

I have the following action methods: public ActionResult ProfileSettings() { Context con = new
I have the edit action method pair: [HttpGet] public ActionResult Edit(Guid id) { return
I have two edit Action methods, one for HttpGet and one for HttpPost. The
I have some action methods behind an Authorize like: [AcceptVerbs(HttpVerbs.Post), Authorize] public ActionResult Create(int
I have two methods declared public void MethodA(object o, Action<string> action) { } public
I have several action methods that can use the same view. I've tried calling
I have a View that gets some bits of data via Action methods that
I have action methods that do things like this: productTable.AddOrUpdate(viewModel.Account); I don't currently test
I have a controller with an action Review like so: [HttpPost, HttpGet] [RoleRequired(Payroll Tech)]
I have the following action method: [HttpGet, Authorize, OutputCache(Duration = 60, VaryByHeader = Cookie,

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.