Hello, 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:
<% Html.RenderAction("DisplayIMHandles", "UserProfile", new { userProfileId = Model.Id }); %>
I get the following error:
Compiler Error Message: CS0121: The call is ambiguous between the following methods or properties:
'System.Web.Mvc.Html.ChildActionExtensions.RenderAction(System.Web.Mvc.HtmlHelper, string, string, object)' and 'Microsoft.Web.Mvc.ViewExtensions.RenderAction(System.Web.Mvc.HtmlHelper, string, string, object)'
I can solve the problem by replacing the line with the either of these 2 alternatives:
<% Microsoft.Web.Mvc.ViewExtensions.RenderAction
(this.Html, "DisplayIMHandles", "UserProfile", new { userProfileId = Model.Id }); %>
or
<% System.Web.Mvc.Html.ChildActionExtensions.RenderAction
(this.Html, "DisplayIMHandles", "UserProfile", new { userProfileId = Model.Id }); %>
Which of the two should I use, what are the differences? Also, is there any way to fix the problem without writting the whole namespace, like I used to have it?
Thank you in advance.