GetViewPath() public static method

public static GetViewPath ( Node container, string viewName ) : string
container Node
viewName string
return string
Beispiel #1
0
        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));
            }
        }
Beispiel #2
0
        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));
            }
        }