private void LoadSelectedView(string name) { try { var respath = ViewManager.GetViewPath(MostRelevantContext, name); Control view = Page.LoadControl(respath); view.ID = "ListViewInternal"; ListViewPanel.Controls.Add(view); } catch (Exception e) { SnLog.WriteException(e); // give a hint to the portal builder about what went wrong this.Controls.Add(new LiteralControl(e.Message)); } }
private void LoadSelectedView(string name) { //if (string.IsNullOrEmpty(name)) // return; try { var respath = ViewManager.GetViewPath(MostRelevantContext, name); Control view = Page.LoadControl(respath); view.ID = "ListViewInternal"; ListViewPanel.Controls.Add(view); } catch (Exception e) { Logger.WriteError(Logger.EventId.NotDefined, e); //give a hint to the portal builder about what went wrong this.Controls.Add(new LiteralControl(e.Message)); } }