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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:38:22+00:00 2026-05-25T21:38:22+00:00

I have a model in MVC 3 that i’m passing into a strongly typed

  • 0

I have a model in MVC 3 that i’m passing into a strongly typed view, the model contains information about an employee. Here is where I am having trouble. I have an edit button that when I press it, it should open a modal box with with all the labels for the employee info in text box form and pre filled with the info from the model.

right now i’m using javascript to find the label elements and then get their innerText. This seems to work fine, but I would really like to stick to using a model as much as I can because some of the labels when you go to edit them aren’t free text they are going to need to be drop downs.

Just any information about why I shouldn’t or should do it with JavaScript.

  • 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-25T21:38:23+00:00Added an answer on May 25, 2026 at 9:38 pm

    For this type of situation I usually make an ajax call to the server and have that return a partial view. Then use jQuery to put the returned partial view into your modal popup.
    Here’s a brief list of what you should need to make this happen:

    1. Have a partial view strongly typed to your employee model that contains the edit form
    2. Make your edit link do an ajax call to an action on your controller and send the employee id or something so you can generate an employee object in your action
    3. In your action return the Partial View containing the form and pass in the employee object
    4. In your success function on the ajax call take the html returned from the call and insert it into your modal popup
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a strongly-typed edit form for a MVC model that contains a
I have a ASP.Net MVC form that is bound to the following view model.
I have an MVC application. The model has a property that is a struct
I have two classes (MVC view model) which inherits from one abstract base class.
I have a doubt about Model behavior in Spring MVC. I have a controller
I've recently discovered that MVC is supposed to have two different flavors, model one
I have a php application that doesn't use the mvc model that i would
I'm writing my first application with Zendframework. My question is about the Model–View–Controller (MVC)
Let's say I have a PHP Model-View-Controller framework that maps an address like http://example.com/admin/posts/edit/5
I have a basic MVC view model with annotations, for example: [Required(ErrorMessage=Your Name Required)]

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.