Questions tagged [renderaction]

RenderAction is an ASP.NET MVC helper method, available starting in the 2nd version, that calls from a view and outputs the results of the action in place within the view.

130 questions
1
vote
2 answers

Reusable components in ASP.NET MVC

I have feature on my website (some UI and associated functionality) that I want to be able to reuse on multiple pages. For the purposes of this question, let's say it's a "Comments" feature. There is an area in my application for Components and…
kristian
  • 22,731
  • 8
  • 50
  • 78
1
vote
2 answers

Passing model from view to controller using Html.RenderAction results in model being null

I have following model: public class Foo { public List Employees{ get; set; } public List Companies{ get; set; } public List Admins{ get; set; } } Then I have my controller actions: public ActionResult…
LeonidasFett
  • 3,052
  • 4
  • 46
  • 76
1
vote
1 answer

asp mvc: show object details on a jquery dialog

Suppose I have a list of dinners. This list will present the users with, location, data and some other relevant info. Since that there's a lot of people attending, I want a button on each dinner that opens a jquery dialog that will show the people…
dcarneiro
  • 7,060
  • 11
  • 51
  • 74
1
vote
1 answer

.net Html.RenderAction returns binary instead of HTML. Huh?

I'm not sure exactly what I'm doing wrong here. I have an action which returns a partial view: public class SharedController : BaseController { public ActionResult StudentPoll() { WAM.X2O.FuelUpToPlayContext db = new…
Michael
  • 11
  • 1
1
vote
2 answers

How to add a weather info to be evalueated only once?

In a ASP.MVC (1.0) project i managed to get weather info from a RSS feed and to show it up. The problem i have is performance: i have put a RenderAction() Method in the Site.Master file (which works perfectly) but i 'm worried about how it will…
Savvas Sopiadis
  • 8,213
  • 10
  • 34
  • 53
1
vote
1 answer

Renderpartial or renderaction

have an action that generates active vacancies. The code is below; public ViewResult OpenVacancies() { var openvacancies = db.GetActiveVacancies(); return View(openvacancies); } I want to use this list on…
femi
  • 974
  • 2
  • 13
  • 44
1
vote
1 answer

RenderAction or RenderPartial dynamically

I have this view that has the following code: @model ComPost.Core.CommandsAndQueries.Contract.DataContract.DepositDetailDTO @section scripts {
1
vote
1 answer

Html.RenderAction - does not have type parameters

I'm trying to use RenderAction in the following way: '<% Html.RenderAction( x => x.ControllerAction() ); %>' as seen here: http://devlicio.us/blogs/derik_whittaker/archive/2008/11/24/renderpartial-vs-renderaction.aspx and…
Ami
  • 1,110
  • 1
  • 13
  • 26
1
vote
3 answers

Asp.Net Mvc - RenderAction - Create in a list view

EDIT I put my solution on a share site. Like that you'll be able to see what I'm talking about. You can download it here : http://www.easy-share.com/1909069597/TestRenderAction.zip To test it, start the project (let the create form empty) and click…
Melursus
  • 10,328
  • 19
  • 69
  • 103
1
vote
1 answer

Html.RenderPartial Works but Html.RenderAction not working (is blank) and no errors or exceptions

Here is what i am trying Layout WebApp Name
Michael
  • 33
  • 1
  • 6
1
vote
4 answers

Render action return View(); form problem

I'm new to MVC, so please bear with me. :-) I've got a strongly typed "Story" View. This View (story) can have Comments. I've created two Views (not partials) for my Comments controller "ListStoryComments" and "CreateStoryComment", which do what…
Roger Rogers
  • 41
  • 1
  • 4
1
vote
1 answer

Why ViewContext after RenderAction PartialView is changed? Route is lost

I'm trying to implement dynamic navigation inside of web project using MVC4. All of my dynamic parts of project are displayed as partial views rendered from controller. Now I have the situation where the initial page ViewContext is not available for…
Roman
  • 665
  • 1
  • 9
  • 24
1
vote
2 answers

How do I render an alternate child view in MVC?

I'm new to working with MVC so please don't assume I know anything. I am picking up a project that has much already written in MVC and I am trying to add some things to it. On one View there is a line <% Html.RenderAction("List", "Image", new { id =…
Jeff Martin
  • 10,812
  • 7
  • 48
  • 74
1
vote
1 answer

ASP.Net 2.0 and the new RenderAction method

I just recently migrated my ASP.Net MVC project from MVC 2.0 Preview 2 to MVC 2.0 Beta, and my calls to Html.RenderAction broke because a new RenderAction method was introduced in MVC 2.0 Beta. In the following line: <%…
Carlos
  • 41
  • 1
  • 3
1
vote
2 answers

Create controller base class (partial)

Since my @html.render action crashes my dev and prod servers i have to use partials(crap). I tried creating public partial controller{} class so i can set needed data for all my views but i am having no luck (everything breaks). I am coming from…
rxhector
  • 41
  • 1
  • 5
1 2 3
8 9