locked
Adding Links to Left Pane RRS feed

  • Question

  • Hi,

     I am trying to add a leftpane link from a web part.

                SPWeb site = SPContext.Current.Web.Site.OpenWeb();
    SPNavigationNodeCollection quickLaunchNodes2 = site.Navigation.QuickLaunch;
    string linkURL = SPContext.Current.Web.Url + "/Lists/ListNameOrSomething/YourPageURL.aspx";
    SPNavigationNode link2List = new SPNavigationNode("Test Link", linkURL, true);
    Its giving a security exception error in line 1 ('SPContext.Current.Web.Site.OpenWeb()' threw an exception of type 'System.Security.SecurityException' ). That user has all the permissions and i have also deployed the assembly in GAC. The trust level is WSS_Medium. I am using MOSS 2007.
    Tuesday, September 15, 2009 6:54 AM