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 8394423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:03:30+00:00 2026-06-09T20:03:30+00:00

I am extremely confused with what is going on. So Go is a boolean

  • 0

I am extremely confused with what is going on.
So Go is a boolean variable and in my Model Go is currently resulting to true.
How come these two result in a different value?

@Html.TextBoxFor(m => m.Go); 
@Model.Go;
@Html.CheckBoxFor(m => m.Go);

@Html.TextBoxFor(m => m.Go) Results to FALSE
@Html.CheckBoxFor(m => m.Go) Results to an UNCHECKED box (when i’m expected a checked box)
@Model.Go Results to TRUE (What I expect to happen)

How come @Html.TextBoxFor(m => m.Go) is resulting to false?
and
How come @Html.CheckBoxFor(m => m.Go) is resulting an UNCHECKED box.
Thank you very much!

My CONTROLLER

    [HttpPost]
    public ActionResult IXT_FS_LeakCheckAnode(IXT_FS_LeakCheckAnodeModel model, string buttontype)
    {
        model.FormObject = new FormSubmitObject();
        // If the Go has been hit, set the FormObject go be true also.
        if (model.Go) { model.FormObject.go = true; }
        // Add values if necessary, If its not on a submit it will be okay, because it     will not submit in the model.
        List<string> list = new List<string>();
        list.Add("SNT" + model.MainSerial);
        list.Add("USR" + model.BadgeID);
        list.Add("TMS" + 0);

        model.FormObject.MainSerial = model.MainSerial; // Sets the main serial

        model.FormObject = mm.submitGetFormHelper(model.FormObject, "XFA", list, ModelState.IsValid, buttontype);
        if (model.FormObject.checkmsg == "go_pass")       // Update header info.
        {
            model.TubeType = model.FormObject.form_values_dict["TUT"];
            model.FormObject.go = true;
            model.Go = true;
        }
        else if (model.FormObject.checkmsg == "get_pass")  // Update the empty filled.
        {
            model.BadgeID = model.FormObject.form_values_dict["USR"];
            model.MainSerial = model.FormObject.form_values_dict["SNT"];

            // Grabs the TMS double value and converts it into a Time Stamp.
            double latestDate_dbl = Convert.ToDouble(model.FormObject.form_values_dict["TMS"]);
            DateTime latestDate = mm.parseTimeStamp(latestDate_dbl);
            model.LatestDate = "Completed on: " + latestDate.ToString();
            ViewData["Error"] = model.FormObject.errormsg;
        }
        else if (model.FormObject.checkmsg == "submit_pass" || model.FormObject.checkmsg == "clear_pass")// Clear form and let operator submission passed. or clear button
        {
            ModelState.Clear();
            IXT_FS_LeakCheckAnodeModel clear_model = new IXT_FS_LeakCheckAnodeModel();
            return View(clear_model);
        }


        ViewData["Error"] = model.FormObject.errormsg;

        return View(model);
    }
  • 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-06-09T20:03:31+00:00Added an answer on June 9, 2026 at 8:03 pm

    More than likely, you have something in ViewBag or ViewData called Go, and it’s interfering with things. MVC prefers model state over model values when rendering.

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

Sidebar

Related Questions

Getting extremely confused with an adminhtml module i'm trying to write! Effectively I have
I'm extremely confused by the proper behavior of UITableView cell rendering. Here's the situation:
So I'm creating my first chrome extension and was extremely confused for a while
I am extremely confused about resource management in C++/CLI. I thought I had a
I'm extremely confused about how to set up Java on Eclipse. I don't get
I am extremely confused why I am getting this strange error all the sudden:
This has gotten me extremely confused. I have one scroll views on a page
I'm losing it here.. I am now extremely confused about how this loop works.
I was looking at the Mutex(Boolean, String) page and i'm completely confused. If i
As title, I am confused about this. swap should be extremely useful if we

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.