Asp.net mvc 2 在MVC IView.Render()方法中呈现*.aspx

Asp.net mvc 2 在MVC IView.Render()方法中呈现*.aspx,asp.net-mvc-2,html-helper,render,Asp.net Mvc 2,Html Helper,Render,我要渲染*.aspx而不是*.ascx namespace GenericMVCPlatform.Generics { public class PlatformView : IView { public void Render(ViewContext viewContext, System.IO.TextWriter writer) { // Here I would like to render an *.aspx i

我要渲染*.aspx而不是*.ascx

namespace GenericMVCPlatform.Generics
{
    public class PlatformView : IView
    {
        public void Render(ViewContext viewContext, System.IO.TextWriter writer)
        {
             // Here I would like to render an *.aspx instead of a *.ascx
        }

        private static MvcHtmlString PartialFor<TPlatformView>(this HtmlHelper instance, TPlatformView viewModel)
        {
            // This one only works for *.ascx
            var result = instance.Partial("~/Views/Shared/PlatformView/Index.ascx" , viewModel);
            return result;
        }
    }
}
命名空间GenericMVCPlatform.Generics
{
公共类平台视图:IView
{
公共void呈现(ViewContext、System.IO.TextWriter)
{
//在这里,我想呈现一个*.aspx而不是*.ascx
}
专用静态MvcHtmlString PartialFor(此HtmlHelper实例,TPlatformView视图模型)
{
//此选项仅适用于*.ascx
var result=instance.Partial(“~/Views/Shared/PlatformView/Index.ascx”,viewModel);
返回结果;
}
}
}

早些时候,我使用HtmlHelper成功地呈现了*.ascx。但是我如何渲染*.aspx?

你找到解决方案了吗?@Frank Michael Kraft:你也在渲染Razor视图吗?