PDA

View Full Version : [CLOSED] PartialExtView and Razor



Timothy
May 03, 2012, 1:47 PM
Hello,

I'm trying to return a partial ext view and I'm receiving the following:



Server Error in '/' Application.
Unable to cast object of type 'System.Web.Mvc.RazorView' to type 'System.Web.Mvc.WebFormView'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Exception Details: System.InvalidCastException: Unable to cast object of type 'System.Web.Mvc.RazorView' to type 'System.Web.Mvc.WebFormView'.


Source Error:


Line 160: }
Line 161:
Line 162: string path = ((WebFormView)View).ViewPath;
Line 163:
Line 164: ViewContext viewContext = new ViewContext(context, View, ViewData, TempData, context.HttpContext.Response.Output);




Source File: D:\Application\Library\Required Dependencies\Ext.NET\Source\2.0.0.DP1\Ext.Net\MVC\ PartialViewResult.cs Line: 162


Stack Trace:


[InvalidCastException: Unable to cast object of type 'System.Web.Mvc.RazorView' to type 'System.Web.Mvc.WebFormView'.]
Ext.Net.MVC.PartialViewResult.ExecuteResult(Contro llerContext context) in D:\Application\Library\Required Dependencies\Ext.NET\Source\2.0.0.DP1\Ext.Net\MVC\ PartialViewResult.cs:162
System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +33
System.Web.Mvc.ControllerActionInvoker.InvokeActio nResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +825460
System.Web.Mvc.ControllerActionInvoker.InvokeActio nResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +265
System.Web.Mvc.ControllerActionInvoker.InvokeActio n(ControllerContext controllerContext, String actionName) +825488
System.Web.Mvc.Controller.ExecuteCore() +159
System.Web.Mvc.ControllerBase.Execute(RequestConte xt requestContext) +335
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +54
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +469
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +375




Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


Cheers,
Timothy

Vladimir
May 03, 2012, 2:25 PM
You have to update from SVN, it is fixed already

Timothy
May 03, 2012, 2:42 PM
Thanks vladsch,

Updated on the tag or the 2.0 branch? I'm using the 2.0DP1 tag.

Cheers,
Timothy

Vladimir
May 03, 2012, 2:51 PM
Please use the following path
http://svn.ext.net/premium/branches/2.0

Also please note that PartialViewRenderer is not update yet for Razor (only PartialViewResult is updated)
MVC support will be seriously improved before final release

Timothy
May 03, 2012, 3:13 PM
Confirmed, please close.

Cheers,
Timothy