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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:41:59+00:00 2026-05-12T15:41:59+00:00

From what I have understood there is a big difference between the Html.RenderPartial included

  • 0

From what I have understood there is a big difference between the Html.RenderPartial included in the ASP.NET MVC release and the HTML.RenderAction in the Microsoft.Web.Mvc.ViewExtensions included in MVC Futures.

On my application I have many pages composed from many “widgets” (sort of) each having its own specific function.

It seemed to me more reasonable to use the RenderAction method as each widget would have a dedicated controller responsible for getting different data and rendering a dedicated view (as opposed to having only one controller and a unique view model to pass to RenderPartial helper to render views).

From the tests I have done having a form that points to a Create action method in a controller like:

 <% using (Html.BeginForm("Create", "Message", FormMethod.Post, 
     new { id = "messageCreateForm" })) {%>

and calling it with

 <% Html.RenderPartial("MessageForm",new MessageDTO()); %>

will render correcly a:

<form id="messageCreateForm" method="post" action="/Message/Create">

but with the same equivalent with RenderAction (so using a MessageForm action method on the controller to render the view) would not render correcly so:

 <% Html.RenderAction<MessageController>(m => m.MessageForm()); %>

will render in:

<form id="messageCreateForm" method="post" action="">

Note that the action is empty.

Is this the correct way to use the RenderAction helper and is it correct to use it in cases like that?

UPDATE:
Actually renaming the partial view to _MessageForm renders the form correcly.

  • 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-12T15:42:00+00:00Added an answer on May 12, 2026 at 3:42 pm

    Very old one, but it jumped into my list of unanswered questions 🙂

    There is a big difference between RenderAction and RenderPartial. RenderPartial will render a View on the same controller (or a shared one), while RenderAction will actually perform an entire cycle of MVC, that is: it will instantiate the controller (any controller you mention, not just the current one), it will execute the action, and it will then return and render the result.

    The RenderPartial is more similar to an inclusion, it will even share the same model if you don’t specify a different one.

    The RenderAction is much more complex (and there may be undesired side effects, that’s why they did not make this function available since version 1 — initially it was available as an experimental feature).

    So in your case, if you have widgets, it’s OK to use both. It depends on the complexity of the widget. If you have one that has to get data from a DB, do something complex, etc… then you should probably use RenderAction.

    I have a News controller responsible for news objects. I created a Block action, which will render a block with the latest news to be put in the home page. This is a perfect example, in my opinion, for RenderAction.

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

Sidebar

Ask A Question

Stats

  • Questions 197k
  • Answers 197k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As the docs say for the datepicker setDate lets you… May 12, 2026 at 7:27 pm
  • Editorial Team
    Editorial Team added an answer There are xcode project files throughout the Chromium code and… May 12, 2026 at 7:27 pm
  • Editorial Team
    Editorial Team added an answer Refer to the Memetracker module. Here is an excerpt from… May 12, 2026 at 7:27 pm

Related Questions

I want to run a web application on php and mysql, using the CakePHP
Our SEO team would like to open up our main dynamic search results page
Preface : I'm honestly not sure if this should be on StackOverflow, SuperUser or
SAP announced Blue Ruby , a version of Ruby that runs inside the ABAP
My main browsers (FF and Chrome) are both configured for a 12 pixel font.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.