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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:49:04+00:00 2026-05-23T01:49:04+00:00

I am using multiple partial views on my View. on the left-hand side. I

  • 0

I am using multiple partial views on my View.
on the left-hand side. I have some link button.

In middle, I have 2 partial views let us suppose Up and Down
I m able to update the Up partial view
now I want to update Down partial view on the click of the same link button

I am able to send only one UpdateTargetID in Ajax.ActionLink button
but I want to update 2 Partial views on the click of the same button.

1) Is there any way I can pass more than one UpdateTargetID in Ajax.ActionLink
or
2) I can return Multiple partial views in Home Controller
or any other way as you suggested
Please reply to me

Thanks, Everyone for replying
Let me tell you what I have done in order to refresh multiple partial view on a single click
This is the Action Link which I m using to click on
Here I m using a OnSucess Function of this Action link in order to update, This Action link is on a partial view

                 <%= Ajax.ActionLink("Select", "Employee", new { Id = Employee.EmployeeID }, new AjaxOptions { UpdateTargetId = "EmployeeDiv", HttpMethod = "Post", OnSuccess = "function(){EmployeeHistory(-2," + Employee.EmployeeID.ToString() + ");}" })%>

This is a javascript that I m calling from a partial view

 function  EmployeeHistory(EmployeeID) {
    var url = '<%= Url.Action("PartialviewAction", "ControllerName") %>'
    $('#PartialviewDiv1').load(url, { Id: EmployeeID });
    var url1 = '<%= Url.Action("PartialviewAction", "ControllerName") %>'
    $('#PartialviewDiv2').load(url1, { Id: EmployeeID });

}

and these two div are in Index view which I want to update

        <div id="Paritalview div1"><% Html.RenderPartial("PartialViewname1"); %></div>
        <div id="Paritalview div2"><% Html.RenderPartial("PartialViewname2"); %></div>
  • 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-23T01:49:05+00:00Added an answer on May 23, 2026 at 1:49 am

    Yes there is – don’t use Ajax.ActionLink.

    IMO, the MS Ajax library, as with Web Forms, is bloated.

    Keep it simple – use jQuery – then you have total control:

    $(function() {
       $('#somelink').click(function(e) {
          e.preventDefault();
    
          $.get('/controller/action1', function(data) {
             $('#up').html(data);
          });
    
          $.get('/controller/action2', function(data) {
             $('#down').html(data);
          });
       });
    });
    

    However, since you’re updating both panels, I would suggest wrapping those two middle panels in a partial view of it’s own – then serve that via a single action method – that way you only need 1 ajax call.

    Edit

    As @FelixM mentions, you should use Url.Action or Url.RouteUrl to generate the URL for the AJAX call, so if your routes change then your JS need not, e.g:

    .get('@Url.Action('Controller', 'Action1')', function(data)

    or

    .get('@Url.RouteUrl('SomeNamedRoute')', function(data)

    If your putting this script in an external file then you’ll need to use a technique to set the url in the main view, then read from the external variable.

    Such techniques include a JavaScript variable, hidden field, passing URL to function as parameter, etc.

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

Sidebar

Related Questions

I am working on a website (Asp.net mvc), where I have multiple partial views.
I'm using partial views in a loop and this is generating multiple id=item_itemD inputs
How do I pass variables to multiple partial views within a view? My idea
First some background: VB.NET 2005 Application that accesses a MS-SQL back-end, using multiple Web
My controller is decorated with [HandleError] and [HandleError(ExceptionType=typeof(CustomException), View=CustomView)] . I have views that
I have a large view that needs some conditional logic to decide which of
I have an asp.net mvc application that uses partial views. How do I know
I have the following structure: Views: Home Articles Partial Views: Book Classes Intro Faq
I am wanting to use a view across multiple areas. I have put the
I.e I have a partial view in MVC Asp.net project with loads of javascript

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.