• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 664
  • Last Modified:

How to disable a menu item in full toolbar in sharepoint

Hi Experts,

I want to disable(not visible) the upload menu option from the Full toolbar.....
i have write a webpart which accutally makes the Upload option invisible(please find the web part code below)

can any one help me how do i make the upload menu item disable?
protected override void CreateChildControls()
        {
            foreach (Control ctrl in this.Page.Controls)
            {
                CheckControl(ctrl);
            }
            base.CreateChildControls();

        }
        private void CheckControl(Control ParentControl)
        {
            try
            {
                foreach (Control childControl in ParentControl.Controls)
                {

                    if (childControl.ToString().ToUpper() == "Microsoft.SharePoint.WebControls.UploadMenu".ToUpper())
                    {
                        childControl.Visible = false;
                        break;
                    }
                    CheckControl(childControl);
                }
            }
            catch (Exception ex)
            {
            }
        }

Open in new window

0
bobby010606
Asked:
bobby010606
1 Solution
 
bobby010606Author Commented:
hi Sector i am very new to share point i am not able to follow the above links can plz give any other solution for this...i need to disable the Upload option ...plz help me
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now