Sunday 13 May 2012

Web Part Verbs in SharaPoint 2010

Step 1)  Add new web part .and in webpart class.

add following code


        public override WebPartVerbCollection Verbs
        {
            get
            {
                WebPartVerb clientside = new WebPartVerb("CLienSide1", "<script>alert('webpart verb  using javascript');</script>");
                clientside.Text = "ClientSide WebPart";
                List<WebPartVerb> ListVerbs = new List<WebPartVerb>();
                ListVerbs.Add(clientside);
                WebPartVerbCollection coll = new WebPartVerbCollection(ListVerbs);
                return coll;
            }
       
        }

No comments:

Post a Comment