Feb 17, 2012, 5:22 PM
[CLOSED] Problems with RenderExtPartial
Hi,
I want to render a ext partial view in my project (ASP.NET MVC3 with Razor view engine). When I run the project, I got the following error.
"Unable to cast object of type 'System.Web.Mvc.RazorView' to type 'System.Web.Mvc.WebFormView'."
Here is how I render the partial view:
I want to render a ext partial view in my project (ASP.NET MVC3 with Razor view engine). When I run the project, I got the following error.
"Unable to cast object of type 'System.Web.Mvc.RazorView' to type 'System.Web.Mvc.WebFormView'."
Here is how I render the partial view:
@Html.RenderExtPartial("test")
I looked at the source code, and find this line in PartialViewRenderer.cs throw the exception.string path = ((WebFormView)view).ViewPath;
Because I am using the Razor view engine, the casting fail. It looks like the partial views only available for the web form view engine. Any ideas on when it will work for Razor? Thanks.
Last edited by Daniil; Feb 20, 2012 at 8:53 AM.
Reason: [CLOSED]