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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:04:05+00:00 2026-05-27T08:04:05+00:00

I have a view that list Parts in a htmltable format from a database

  • 0

I have a view that list Parts in a htmltable format from a database table PartList. The htmltable contains a link which should be used to enter values to the database table Bom. When clicked on the link, it should load a partialview for that particular Part. The partialview contains a dropdown to select the child part, a textbox to enter the quantity and a htmltable that shows the other bom enter for that part. What am struck up with is I need to load the partialview accepting the partId using ajax. The partialview should be loaded to a div in the listPart view. How to acheive this?

  • 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-27T08:04:06+00:00Added an answer on May 27, 2026 at 8:04 am

    You are not clear about your question by not showing your current code. As far as I understood, this blog post should give you an idea:

    Working With JQuery Ajax API on ASP.NET MVC 3.0 – Power of JSON, JQuery and ASP.NET MVC Partial Views

    What you need to do is simple:

    1. Make an ajax call to you controller action:

      $.ajax({
          type: "POST",
          url: actionURL,
          data: d,
          success: function (r) {
              $("#to-do-db-list-container").html(r.data);
          },
          complete: function () {
              $("#ajax-progress-dialog").dialog("close");
              $(".isDone").bind("click", function (event) {
                  toggleIsDone(event, $(this));
              });
          },
          error: function (req, status, error) {
              //do what you need to do here if an error occurs
              $("#ajax-progress-dialog").dialog("close");
          }
      });
      
    2. Return your partial view:

      [HttpPost]
      public ActionResult toogleIsDone(int itemId) {
      
          //Getting the item according to itemId param
          var model = _entities.ToDoTBs.FirstOrDefault(x => x.ToDoItemID == itemId);
          //toggling the IsDone property
          model.IsDone = !model.IsDone;
      
          //Making the change on the db and saving
          ObjectStateEntry osmEntry = _entities.ObjectStateManager.GetObjectStateEntry(model);
          osmEntry.ChangeState(EntityState.Modified);
          _entities.SaveChanges();
      
          var updatedModel = _entities.ToDoTBs;
      
          //returning the new template as json result
          return Json(new { data = this.RenderPartialViewToString("_ToDoDBListPartial", updatedModel) });
      }
      

    RenderPartialViewToString is a controller extension which renders your partial view inside your controller and return back a string value for the output. You will find all the code inside the blog post.

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

Sidebar

Related Questions

I have a picker view that has a list of numbers to pick from.
We have created a new List View Style that shows thumbnails from a picture
I have two classes. In my first class i have table view which contains
I have a view that has a list of jobs in it, with data
I have a list view that is periodically updated (every 60 seconds). It was
I have used a list view that uses a grid view in WPF. I
I have created a list view that displays the names and dates of items
I have a MySQL table that represents a list of orders and a related
I have a view that I want to add some custom drawing to. I
I have a View that can vary significantly, depending on the 'mode' a particular

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.