protected override void RenderWhenModelIsNull(System.Web.UI.HtmlTextWriter writer) { if (IsEditing || IsPreviewing) { NullModelHelper.RenderNullModelMessage(writer, ViewPath, DataSource, PresenterFactory.GetPresenter <TModel>().GetType(), typeof(TModel)); } }
/// <summary> /// Method called when it is time to render the control but the Model is null. By default causes the control to render nothing unless in Page Editor or Preview mode. /// </summary> protected virtual void RenderWhenModelIsNull(HtmlTextWriter writer) { if (IsEditing || IsPreviewing) { NullModelHelper.RenderNullModelMessage(writer, AppRelativeVirtualPath, DataSource, PresenterFactory.GetPresenter <TModel>().GetType(), typeof(TModel)); } }