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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:57:03+00:00 2026-05-25T09:57:03+00:00

Scenario: My app has to make a request (AJAX) and based on request multiple

  • 0

Scenario:
My app has to make a request (AJAX) and based on request multiple divs (these divs are PartialViews) have to be updated on client. The divs or partialviews can be expensive call if made individually.

Idea:
When a request is done, JS will collect list of partial views to be updated with whatever parameters and send AJAX request. Controller receives the request and executes all partial views in parallel using TP library, collect rendered markup, and send back response to client where client plots the partial views/div in page.

Challenge:
On the server after receiving list of partial views with parameters. How can I execute partial views (names passed from client) in the Action Method and get their markup/json response?

Thanks in advance.

  • 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-25T09:57:04+00:00Added an answer on May 25, 2026 at 9:57 am

    Using the code from this question to get the HtmlHelper:
    Using HtmlHelper in a Controller

    public static HtmlHelper GetHtmlHelper(this Controller controller)
    {
        var viewContext = new ViewContext(controller.ControllerContext, new FakeView(), controller.ViewData, controller.TempData, TextWriter.Null);
        return new HtmlHelper(viewContext, new ViewPage());
    }
    
    public class FakeView : IView
    {
        public void Render(ViewContext viewContext, TextWriter writer)
        {
            throw new InvalidOperationException();
        }
    }
    

    Then in your controller action method:

    var helper = GetHtmlHelper(this);
    var html1 = helper.Partial("PartialView1");
    var html2 = helper.Partial("PartialView2");
    

    Then return the HTML fragments in whatever format is convenient for you.

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

Sidebar

Related Questions

Here's a scenario: I have a java front end (RCP/SWT) app which currently has
I have to make an iPhone app for a company which has a web
I have an asp.net mvc app with a route that allows users to request
I just encountered the following situation. I have an Android app with a scenario
Scenario: Creating an app for learning purposes and am trying to make it database
Consider this scenario. We have an internal Rails 2 app that connects to a
Please consider this scenario: a web app that has 4 levels of access: admin
Here's my use case. I have a desktop app that can download from my
Here is the scenario: I'm writing an app that will watch for any changes
Here's the scenario. I'm debugging my own app (C/C++) which is using some library

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.