May 03, 2012, 1:47 PM
[CLOSED] PartialExtView and Razor
Hello,
I'm trying to return a partial ext view and I'm receiving the following:
Timothy
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(ControllerContext 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.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +825460
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +265
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +825488
System.Web.Mvc.Controller.ExecuteCore() +159
System.Web.Mvc.ControllerBase.Execute(RequestContext 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.HttpApplication.IExecutionStep.Execute() +469
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Cheers,Timothy
Last edited by Daniil; May 03, 2012 at 3:30 PM.
Reason: [CLOSED]