0

为什么显示的值为空

 public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
    var display = BuildManager.CreateInstanceFromVirtualPath(
                    _virtualPath, typeof(Page)) as IDisplay;
    return display;
}

_virtualPath 的值是字符串类型的 '~/RegisterUser.aspx'

4

1 回答 1

0

在您的页面代码隐藏继承自 IDisplay 示例:

using System.Web.UI;
using System.Web.UI.WebControls;

public partial class secondpage: System.Web.UI.Page, **IDisplay**     <--------------------
{
    protected void Page_Load(object sender, EventArgs e)
    {

    } 
}
于 2014-12-12T18:36:39.587 回答