Home > Development, Microsoft Office SharePoint Server 2007 > Understanding and working with the Web Part Verbs

Understanding and working with the Web Part Verbs

Here, I display what are the web part verbs and how we can implement it in web part code.

Web part verb is an action rendered in the web part menu by the web part frame work as part of the chrome which rendered a rounded the  web part.

The verbs can do server side or client side actions.To implement verbs in web parts we need to override verbs property.

Let us display an example about web part verbs:-

This is a simple example to illustrate the role of web verbs, I’ll add a verb called “Change Button Tile”, as below screen shoot when we click on this verb a server side handler to change button text form “Before click on verbs”

to “After click on verbs”

Here’s the implementation of Web Part Verbs

As web said above web part verb is an action which can call a client-side function or a server-side handler. Here we add server side handler.

To add Web Part Verbs as menu items, override the Verbs property of the Web Part. The Verbs property returns a read-only WebPartVerbCollection, so you will need to merge a collection of Verbs with the base.Verbs property to create a new WebPartVerbCollection

Here as I said, I have implemented a server side handler for change button title, as the following

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: