views:

386

answers:

1

Hi,

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 here:

http://eduncan911.com/blog/html-renderaction-for-asp-net-mvc-1-0.aspx

but I keep getting an error about the method not having type parameters. also in MSDN I see there is no documentation for it, and also checking the MVC source code I can't find anything. I'm using the latest ASP.Net MVC (2.0 RTM)

is this feature no longer available? how can I use it?

thanks.

+1  A: 

There are no Html.RenderAction overload which accepts an expression in the ASP.Net MVC 2 RTM. So no, it's not available.

çağdaş
were there such overloads in the past? where did they go?
Ami
It's in Futures (http://aspnet.codeplex.com/releases/view/41742). Import the Microsoft.Web.Mvc namespace, and you'll see them as extension methods hanging off of HtmlHelper. The particular class that contains the extension methods is Microsoft.Web.Mvc.LinkExtensions.These helpers are buggy and unsupported, so use them at your own risk.
Levi
Thanks Levi. if it was an answer I could have marked it...
Ami