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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:54:44+00:00 2026-05-21T16:54:44+00:00

Say I have a view, strongly typed to MyObject, with an Html.HiddenFor(x => x.MyValue)

  • 0

Say I have a view, strongly typed to MyObject, with an Html.HiddenFor(x => x.MyValue)

When I post the for back to the server, MyValue is bound properly with myObject.MyValue.

Now, say on the form I want to use jQuery to make a TextBox visible containing MyValue, allow the user to edit this, and post the new value back to the server.

How can I handle this? Should I just update the hidden field? Can I somehow specify which element to bind to on the client side?

  • 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-21T16:54:45+00:00Added an answer on May 21, 2026 at 4:54 pm

    you can update values of your hidden field in submit event of the form. Probably, you are displaying form values in labels (or spans or divs) when user is not in edit mode and user can toggle between edit and display mode. if you update your values only before the form is being submit you don’t have to bother about intermediate values user entered and cancelled out

    $(function(){
    $("#Myform").submit(function(){
       //Here you can update values of your hidden fields
        return true;
    });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a strongly-typed view of ViewPage<Song> and some additional fields in the
Say I have just a normal view(not strongly typed) and in this view I
Let's say I have an edit view that is strongly-typed to a table called
Lets say I have a view page(request) which loads page.html. Now after successfully loading
So let's say I have a view that access a date: <%= Html.TextBoxFor(model =>
Hi, I have a Strongly typed view in ASP.NET MVC. To keep track on
Let's say I have a view, views/layouts/home.html.haml , and I am overriding it with
I have a ModelA model and a strongly typed view ViewA which is typed
Lets say I have a view file that is built like this: <html> ...
I am using backbone.js here is my scenario Lets say I have a view

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.