10/26/2010

SharePoint: Create a Quote of the Day Web Part (a CEWP trick!)

 

Note: The following works for both SharePoint 2007 and 2010.

The 2013 version of this can be found here: http://techtrainingnotes.blogspot.com/2015/06/sharepoint-2013-create-quote-of-day-web.html

 

Quote of the Day / Tip of the Day

Want to display some “wise words” for your coworkers? You need a Quote of the Day web part!

image

 

This web part is another simple Content Query Web Part solution.

  • Works from a normal SharePoint list
  • Displays a random quote from the list
  • Can display a new quote on each page view, or just one new quote a day
  • Can be used to display quotes, product announcements or any kind of text
  • Uses a Rich Text field so you can include formatting

Create the Quotes list

While you could use a Custom List, I used an Announcements list as it already had what I needed, a Title field and a Rich Text field.

  1. Go to Site Actions, Create
  2. Click Announcements
  3. Add a name for the list such as “Quotes”
  4. The description is optional, but is best left blank as it adds a little complication later on
  5. Click OK
  6. If you are not using the Announcements list type then from the list’s Settings menu click Create Column and add a “Multiple Lines of Text” column. Name the column “Quote” (although any name will work) and click “Rich text (Bold, italics, text alignment)
  7. Add a few quotes by clicking New
    image
  8. Create a new view by clicking the “View:” dropdown and click Create View
  9. Create the view as a Standard view and name it something like “Web Part View”. Un-checkmark all columns except for “Quote” column (the “Body” column if using an announcements list)
  10. In 2010, expand the Tabular View section and uncheckmark "Allow individual item checkboxes"
  11. Click OK

 

 

Add the Quotes list web part to the page

  1. Go to the page where you want to add the “Quote of the Day”
  2. Click Site Actions, Edit Page
  3. Click add a web part and add the web part for the quotes list
  4. In the web part click Edit and Modify Shared Web Part
  5. Select the view you created above (“Web Part View”)
  6. Click OK

image

 

The Content Editor Web Part

  1. Add a Content Editor Web Part (CEWP) and move it so it is below the quotes web part 
  2. Click the CEWP’s dropdown menu and select Modify Shared Web Part
  3. In the Appearance section add a title for the web part (perhaps “Quote of the Day”)
  4. Now you have two choices:
    • Click the Source Editor button and copy and paste the JavaScript that you will find later in this article
                    or (good idea for 2007 and the best practice for 2010!)
    • Create the JavaScript in your favorite HTML editor (Visual Studio, SharePoint Designer, Notepad, etc), upload it to a library and enter the path to the file in the Content Editor Web Part’s  “Content Link” box.

      This second choice is preferred for a few reasons:
      • You can use your editor’s Intellisense, copy and paste,  and other features to help write the code
      • You can write the code and upload to a library once, then use it in multiple Content Editor Web Parts   (…edit in one place…update in many…)
      • Easier to backup, share with other site owners and document

 

ID’ing your Web Part

To write JavaScript to interact with the HTML of a web part you need to indentify the web part’s HTML. SharePoint’s web parts have a custom attribute named “title”.  This title consists of two parts: the title entered in the Appearance section of the web part’s properties and the description entered in the list’s “Title, Description and Navigation” settings. Note that when you have a description, the title attribute includes a “-“ as separator.

Examples:

Web Part Title List Description HTML “title”
Quotes none entered Quotes
Quotes Cool words of wisdom Quotes - Cool words of wisdom
     

So how do you find it, just to make sure…

Display the SharePoint page with the list’s web part (probably your site’s home page), use the browser’s “View Source” feature (In IE 6 click the View menu, then click Source) and search for the name of the web part. What you are looking for should be something like this:

  image_thumb9

Or like this if there is no list description:

  image_thumb10

 

The JavaScript

Copy and paste the following JavaScript into your Content Editor Web Part. (see the two options described above)

 

<!-- add your own formatting here... -->

<span name="QuoteText" id="QuoteText"></span>



<script>
// another CEWP trick from http://TechTrainingNotes.blogspot.com
//
// name of the quotes library web part
var quotesWebPartName="Quotes"; 
//
// set this to "true" so the user will see the same quote 
// for 12 hours or until they close and reopen the browser
var OneQuotePerVisit = false;

// don't change these
var QuoteList;
var QuoteArray = [];
var quoteCount = 0;


  //Find the quotes web part and hide it
  var x = document.getElementsByTagName("TD"); // find all of the table cells

  var i=0;
  for (i=0;i<x.length;i++) 
  {
    if (x[i].title == quotesWebPartName)
    {
      // tables in tables in tables... ah SharePoint!
      QuoteList = x[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;

      // hide the links list web part
      QuoteList.style.display="none"; 
      break;
    } 
  }

  if (!QuoteList)
  {
    document.all("QuoteText").innerHTML="Web Part '" + quotesWebPartName + "' not found!";
  }

  //Count the quotes

  var links = QuoteList.getElementsByTagName("TR") // find all of the rows
  var url;
  var quoteCount = 0;
  for (i=0;i<links.length;i++) 
  {
    
    if (links[i].childNodes[0].className=="ms-vb2")
    {
      QuoteArray[quoteCount] = i; 
      quoteCount++;
//alert("quotes " + links[i].childNodes[0].innerHTML)

    }
  }
  
  if (quoteCount==0)
  {
    document.all("QuoteText").innerHTML="No quotes found in web part '" + quotesWebPartName + "'!";
  }

  var id=-1;

  // check for a cookie and use last ID if found

  if (OneQuotePerVisit)
  {
    // check for a cookie with the last quote ID
    if (document.cookie.length>0)
    {
    c_start=document.cookie.indexOf("LastQuoteDisplayedID=");
    if (c_start!=-1)
      {
      c_start=c_start + "LastQuoteDisplayedID".length+1;
      c_end=document.cookie.indexOf(";",c_start);
      if (c_end==-1) c_end=document.cookie.length;
      id = unescape(document.cookie.substring(c_start,c_end));
      }
    }
  }

  if (id == -1) 
  { 
    // generate a random quote ID
    id = Math.floor(Math.random() * QuoteArray.length) 
  }

  // display the quote
  document.all("QuoteText").innerHTML= QuoteList.getElementsByTagName("TR")[QuoteArray[id]].childNodes[0].innerHTML;

  if (OneQuotePerVisit)
  {
    // set a cookie so they see the same quote for xx hours (.5 = 1/2 day = 12 hours)
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + 1);
    document.cookie="LastQuoteDisplayedID=" + id //+ ";expires=" + exdate.toUTCString();
  }

</script>

 

.

10/20/2010

Special Edition: Live Chat to Learn More About SharePoint from the MVP Experts and the Microsoft Certified Masters!

 

Wednesday, October 27th between 9:00 AM and 10:00 AM PDT!
(12:00 Noon Cincinnati time!)

 

Do you have questions about SharePoint? Want to learn more about SharePoint 2010?  In this special event the Microsoft Certified Masters (MCM) for SharePoint will be joining the SharePoint MVPs from around the world for their monthly live chat. These popular Q&A events are a great opportunity to tap into the vast knowledge of these industry professionals who are regarded as the best in their field.

Please join us on Wednesday, October 27th between 9:00 AM and 10:00 AM PDT! (12:00 Noon Cincinnati time!) Learn more and add these chats to your calendar by visiting the MSDN event page http://msdn.microsoft.com/en-us/chats/default.aspx.

So who are the SharePoint MCMs? The Microsoft Certified Master (MCM) programs offer exclusive, advanced training and certification on Microsoft server technologies to seasoned IT professionals. The SharePoint MCMs are a growing community of 50+ members who have completed the program, validating their skills as technology experts who successfully design and implement solutions that meet the most complex business requirements. SharePoint MCMs include partners, MVPs, and internal Microsoft consultants, architects, and engineers. If you think you have what it takes to become a Microsoft Certified Master, learn more about Microsoft’s advanced training programs here.

How can I connect with a SharePoint MCM?

• Attend one of the many conferences where they’re attending or speaking

• Peruse the MCM Directory

• Learn from their experiences via the MCM blog roll on The Master Blog

• Find them answering questions in the forums

 

http://blogs.msdn.com/b/mvpawardprogram/archive/2010/10/19/special-edition-live-chat-to-learn-more-about-sharepoint-from-the-mvp-experts-and-the-microsoft-certified-masters.aspx

Twitter: #spmvpchat

Facebook Event:
http://www.facebook.com/event.php?eid=140173309363782&num_event_invites=0#!/event.php?eid=140173309363782

.

10/19/2010

SharePoint: Add Colors, Borders and Fonts to Web Parts

This example is for SharePoint 2007. A 2010 version using all CSS is here:

http://techtrainingnotes.blogspot.com/2011/06/sharepoint-2010-add-colors-borders-and.html

A version of this article using CSS instead of JavaScript can be found here:
http://techtrainingnotes.blogspot.com/2011/06/sharepoint-2007-use-css-to-add-colors.html

 

A picture is worth a thousand words… so here’s the first thousand:

image

 

See the big Links list web part!  Let’s see how to do that…

 

 

Web Part HTML

SharePoint web parts are rendered as HTML tables. All we need to know to change a web part is something about the HTML used and some way to find the web part using JavaScript.

 

The Content Editor Web Part

This little article is another one of those Content Editor and JavaScript tricks that I keep coming up with. So lets start with the Content Editor Part first.

  1. Edit the page (Site Actions, Edit Page) and add a Content Editor Web Part
  2. Drag the new web part so it is below the web part you want to change (adding it as the last web part in the right most column will also work)
  3. Click the new web part’s dropdown menu and select Modify Shared Web Part
  4. Now you have two choices:
    • Click the Source Editor button and copy and paste the JavaScript that you will find later in this article
                    or
    • Create the JavaScript in your favorite HTML editor (Visual Studio, SharePoint Designer, Notepad, etc), upload it to a library and enter the path to the file in the Content Editor Web Part’s  “Content Link” box.

      This second choice is preferred for a few reasons:
      • You can use your editor’s Intellisense, copy and paste,  and other features to help write the code
      • You can write the code and upload to a library once, then use it in multiple Content Editor Web Parts   (…edit in one place…update in many…)
      • Easier to backup, share with other site owners and document

Hide the Content Editor Web Part

When you are all done with this project, hide the CEWP by editing it and setting it’s Chrome to “None”. Chrome is in the Appearance section.

 

ID’ing your Web Part

To write JavaScript to interact with the HTML of a web part you need to indentify the web part’s HTML. SharePoint’s web parts have a custom attribute named “title”.  This title consists of two parts: the title entered in the Appearance section of the web part’s properties and the description entered in the list’s “Title, Description and Navigation” settings. Note that when you have a description, the title includes a “-“ as separator.

Examples:

Web Part Title List Description HTML “title”
Vendor Links none entered Vendor Links
Vendor Links Preferred Vendors Vendor Links - Preferred Vendors
     

As the list’s description can be changed at any time, we probably should check for just the web part’s title. The JavaScript checks for part of the title by using:   title.substring(0,5)=="Links"

So how do you find it, just to make sure…

Display the SharePoint page with the list’s web part (probably your site’s home page), use the browser’s “View Source” feature (In IE 6 click the View menu, then click Source) and search for the name of the web part. What you are looking for should be something like this:

image

Or like this if there is no list description:

image

 

The JavaScript

The JavaScript has two jobs, find the “TD” tag with your title and then “drill” up or down from that TD to the HTML you want to change. So the first block of sample code just finds the TD tag.

Note: This can be done with less “code” by using jQuery. The downside is that you also have to upload a jQuery library to your site. (If I get a chance I’ll return here and add the jQuery version also.)

When you copy and paste the code, use the example at the bottom of the page, or download from here.

<script type="text/javascript">

// Yet another JavaScript trick from TechTrainingNotes.blogspot.com!
// Add colors, fonts, borders and backgrounds to web parts

var x = document.getElementsByTagName("TD");
for (var i=0; i<x.length; i++)
{

  if (x[i].title.substring(0,5)=="Links")
  {
    var td = x[i];  // this is the cell with our title

    // change the title bar
    td.bgColor="red";

    // add other things to change here!

    
    break; // we found our TD, so don't process any more TDs
  }
}

</script>

The above example just sets the title area background to red.

image

 

What else can you do?

Now that we have the TD with our title, we can now start “drilling” up or down by using “.parentNode” and “childNode”, or use “.nextSibling” to find the next same level tag.

Here’s some examples… but what you can do is only limited by your puzzle solving skills and your knowledge of HTML and CSS.

 

Change the title size and font
    td.childNodes[0].childNodes[0].style.fontSize="30px";
    td.childNodes[0].childNodes[0].style.fontFamily="Comic Sans MS";

Change the background images for the title area
    td.childNodes[0].style.backgroundImage="url(/_layouts/images/helpicon.gif)"

 

Change the title text color
    td.childNodes[0].childNodes[0].style.color="white";

 

Change the title area including dropdown
    td.parentNode.bgColor="red";

 

Change the entire web part’s background
    td.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.bgColor="red";

 

Change background for all but the title bar
    td.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling.bgColor="lightgrey";

 

Change the background image for all but the title bar
    //td.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.backgroundImage="url(/_layouts/images/helpicon.gif)"

 

Change the border for the entire web part
    td.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.border="3px solid green";

 

Change all of the links
    var txt = td.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling.getElementsByTagName("A");
    for (var j=0; j<txt.length; j++)
    {
      if (txt[j].innerText != "Add new link")
      {
        txt[j].style.fontSize="14px";
        txt[j].style.fontWeight="bold";
      }
    }

 

Here’s the JavaScript that was used to create the sample at the beginning of the article:
(Commented out line (“//”) were not needed for the example)

image

 

You can download the code from here.

<script type="text/javascript">


// Yet another JavaScript trick from TechTrainingNotes.blogspot.com!
// Add colors, fonts, borders and backgrounds to web parts

var x = document.getElementsByTagName("TD");
for (var i=0; i<x.length; i++)
{

  if (x[i].title.substring(0,5)=="Links")
  {
    var td = x[i];
    // change the title bar
    //td.bgColor="red";

    // change the title size and font
    td.childNodes[0].childNodes[0].style.fontSize="30px";
    td.childNodes[0].childNodes[0].style.fontFamily="Comic Sans MS";
    
    // change the background images for the title area
    //td.childNodes[0].style.backgroundImage="url(/_layouts/images/helpicon.gif)"

    // change the title text color
    td.childNodes[0].childNodes[0].style.color="white";

    // change the title area including dropdown
    td.parentNode.bgColor="red";
    
    // change the entire web part
    //td.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.bgColor="red";

    // change background for all but the title bar
    td.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling.bgColor="lightgrey";

    // change the background image for all but the title bar
        //td.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.backgroundImage="url(/_layouts/images/helpicon.gif)"

    // Change the border for the entire web part
    td.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.border="3px solid green";

    // change all of the links
    var txt = td.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling.getElementsByTagName("A");
    for (var j=0; j<txt.length; j++)
    {
      if (txt[j].innerText != "Add new link")
      {
        txt[j].style.fontSize="14px";
        txt[j].style.fontWeight="bold";
      }
    }
    
    
    break; // we found our TD, so don't process any more TDs

  }
}
</script>

 

 

Have fun!

 

.

10/10/2010

Classroom Helicopter!

 

Update 12/16/10… prices sure keep changing on this little helicopter!  The link below has varied from apx $20 to $40 over the last few days.  Click the link below and then do a search for “S107 helicopter” to see if there are any better prices.

---

 

I have occasionally brought a “toy” helicopter to class. I bought it on a trip to North Canton, OH at the MAPS aviation museum. When I bought it I was just looking for a toy for the extended hotel stay, and I was intrigued that it was mostly metal, not plastic. But I found it to be amazing stable. The first time I flew it, it just lifted off and hovered! No fighting it, no bouncing off the walls, just a perfect hover. Months later I have only broken one part, the little tail rotor, and there was a spare one in the box! (Don’t tell anybody, but this big kid took the indoor heli outdoors to see how high it would go. When it got up about 100’, which was probably the range of the IR radio, it turned itself off and fell and hit the roof. Nothing was broken!

Several people have asked about it and I had no idea where they could find one.  Turns out is was real easy… it’s available from Amazon.com and about 1000 places on the web.

       

 

Don’t blame me for the time you waste with this thing… or that you had to get three more for the kids.

 

MAPS

If you ever get to the Akron / Canton area, look up the MAPS museum.  It’s nicely hidden on the back side of the Akron airport, should you visit you will need to do a bit of looking to find it.

While I’m a bit spoiled by being near the U.S. Air Force Museum in Dayton, MAPS is worth the visit for both the aircraft, and the chance to talk to the folks who restore them.

http://www.mapsairmuseum.org/

Using SharePoint Web Controls

 

If you are doing SharePoint development, you probably want to keep the SharePoint look and feel for common ASP.NET controls such as GridView, and use the SharePoint unique controls like the People Picker. Like many things in an API, your first challenge is finding just what is available.  Below (mostly for my own future reference) is a list of the web controls found in Microsoft.SharePoint.DLL (Windows® SharePoint Server). 

PowerShell to the rescue… I did not hand type all of the following. I just used this little PowerShell script:

$c = [System.Reflection.Assembly]::loadwithpartialname("Microsoft.SharePoint")

$c.GetTypes() | where {$_.BaseType -Like "Microsoft.SharePoint.WebControls.*"} | select basetype, name | sort name,basetype 

 

Microsoft MSDN documentation can be found here:

2007:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols%28v=office.12%29.aspx

2010:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.aspx

 

 

SP 2007 Web Controls ordered by Base Type

 

All of the following are in Microsoft.SharePoint.WebControls (i.e. Microsoft.SharePoint.WebControls.ActionsMenu)

BaseType                    Name                                                      
--------                    ----                                                      
.ActionsMenu                GlobalGalleryActionsMenu                                  
.ActionsMenu                MWSActionsMenu                                            
.AdministrationDataSourc... DataTableDataSourceView                                   
.AlphaImage                 ViewIcon                                                  
.ApprovalButton             DistributionListsApprovalButton                           
.BaseChoiceField            CheckBoxChoiceField                                       
.BaseChoiceField            DropDownChoiceField                                       
.BaseChoiceField            RadioButtonChoiceField                                    
.BaseFieldControl           AllDayEventField                                          
.BaseFieldControl           AttachmentsField                                          
.BaseFieldControl           AttendeeField                                             
.BaseFieldControl           BaseChoiceField                                           
.BaseFieldControl           BaseTextField                                             
.BaseFieldControl           BooleanField                                              
.BaseFieldControl           CalculatedField                                           
.BaseFieldControl           ComputedField                                             
.BaseFieldControl           CrossProjectLinkField                                     
.BaseFieldControl           DateTimeField                                             
.BaseFieldControl           FieldValue                                                
.BaseFieldControl           FileField                                                 
.BaseFieldControl           FormField                                                 
.BaseFieldControl           LookupField                                               
.BaseFieldControl           ParentInformationField                                    
.BaseFieldControl           RatingScaleField                                          
.BaseFieldControl           RecurrenceField                                           
.BaseFieldControl           UrlField                                                  
.BaseFieldControl           UserField                                                 
.BaseNumberField            CurrencyField                                             
.BaseNumberField            NumberField                                               
.BaseTextField              BaseNumberField                                           
.BaseTextField              NoteField                                                 
.BaseTextField              TextField                                                 
.BaseXmlDataSource          SoapDataSource                                            
.BaseXmlDataSource          SPXmlDataSource                                           
.BaseXmlDataSource          XmlUrlDataSource                                          
.ContextSelector`1[Micro... SiteAdministrationSelector                                
.ContextSelector`1[T]       PersistedObjectContextSelector`1                          
.DailyCalendarView          WeeklyCalendarView                                        
.DatePicker                 MonthPicker                                               
.EditItemButton             WikiEditButton                                            
.EditItemButton             WikiEditItemButton                                        
.EntityEditor               EntityEditorWithPicker                                    
.EntityEditorWithPicker     PeopleEditor                                              
.FieldMetadata              AppendOnlyHistory                                         
.FieldMetadata              BaseFieldControl                                          
.FieldMetadata              CompositeField                                            
.FieldMetadata              FieldDescription                                          
.FieldMetadata              FieldLabel                                                
.FieldMetadata              FieldProperty                                             
.FileField                  WikiFileField                                             
.FormButton                 AlertMeButton                                             
.FormButton                 ApprovalButton                                            
.FormButton                 AttachmentButton                                          
.FormButton                 ChangePasswordButton                                      
.FormButton                 CheckInCheckOutButton                                     
.FormButton                 ClaimReleaseTaskButton                                    
.FormButton                 DeleteItemButton                                          
.FormButton                 DeleteItemVersionButton                                   
.FormButton                 EditItemButton                                            
.FormButton                 EditSeriesButton                                          
.FormButton                 EnterFolderButton                                         
.FormButton                 ExportWebPartButton                                       
.FormButton                 ManageCopiesButton                                        
.FormButton                 ManagePermissionsButton                                   
.FormButton                 MyAlertsButton                                            
.FormButton                 MyRegionalSettingsButton                                  
.FormButton                 NewItemButton                                             
.FormButton                 RestoreItemVersionButton                                  
.FormButton                 UserInfoListDeleteItemButton                              
.FormButton                 UserInfoListEditItemButton                                
.FormButton                 VersionHistoryButton                                      
.FormButton                 ViewWebPartXmlButton                                      
.FormButton                 WikiIncomingLinksButton                                   
.FormButton                 WikiPageHistoryButton                                     
.FormButton                 WorkflowsButton                                           
.FormComponent              ApprovalMessage                                           
.FormComponent              ApprovalStatus                                            
.FormComponent              AssignToEmailMessage                                      
.FormComponent              AttachmentUpload                                          
.FormComponent              AttendeeEmailResponse                                     
.FormComponent              BackLinksIterator                                         
.FormComponent              ChangeContentType                                         
.FormComponent              CopySourceInfo                                            
.FormComponent              CopySourceUrlInfo                                         
.FormComponent              CreatedModifiedInfo                                       
.FormComponent              CreationType                                              
.FormComponent              DiffSelectorIterator                                      
.FormComponent              DocumentLibraryFields                                     
.FormComponent              DocumentTransformersInfo                                  
.FormComponent              EmailCalendarMessage                                      
.FormComponent              FieldMetadata                                             
.FormComponent              FileUploadedMessage                                       
.FormComponent              FolderFormFields                                          
.FormComponent              FormToolBar                                               
.FormComponent              GoBackButton                                              
.FormComponent              GoToCopySourceLink                                        
.FormComponent              InformationBar                                            
.FormComponent              InitContentType                                           
.FormComponent              ItemHiddenVersion                                         
.FormComponent              ListFieldIterator                                         
.FormComponent              NextPageButton                                            
.FormComponent              RequiredFieldMessage                                      
.FormComponent              SaveButton                                                
.FormComponent              UnlinkCopyButton                                          
.FormComponent              UserInfoListFormToolBar                                   
.FormComponent              VersionDiff                                               
.FormComponent              WebPartPageMaintenanceMessage                             
.FormComponent              WorkflowForm                                              
.FormDigest                 SPMobileFormDigest                                        
.GoBackButton               MultiPageGoBackButton                                     
.HtcMenu                    SPMenu                                                    
.HtcMenuItem                HtcMenuOption                                             
.HtcMenuItem                HtcMenuSeparator                                          
.HtcMenuItem                HtcSubMenu                                                
.HtcMenuOption              SPMenuOption                                              
.IDataSourceConsumer        MergedDataSource                                          
.IDataSourceConsumer        SingleDataSource                                          
.InputFormCustomValidator   UrlValidator                                              
.InputFormRequiredFieldV... PasswordTextBoxValidator                                  
.LayoutsPageBase            ContentsPage                                              
.ListFieldIterator          SurveyFieldIterator                                       
.ListFieldIterator          VersionDiffIterator                                       
.ListViewSelector           MWSListViewSelector                                       
.LookupField                MultipleLookupField                                       
.MenuTemplate               FeatureMenuTemplate                                       
.MergedDataSource           ASyncMergedDataSource                                     
.MergedDataSource           SyncMergedDataSource                                      
.NewMenu                    MWSNewMenu                                                
.NoteField                  RichTextField                                             
.OWSControl                 OWSDateField                                              
.OWSControl                 OWSNumberField                                            
.OWSControl                 OWSSubmitButton                                           
.PersistedObjectContextS... ServerSelector                                            
.PersistedObjectContextS... WebApplicationSelector                                    
.PickerDialog               PeoplePickerDialog                                        
.PickerQueryControlBase     SimpleQueryControl                                        
.PickerResultControlBase    TableResultControl                                        
.RenderingTemplateContainer SPCalendarContainer                                       
.RenderingTemplateContainer SPCalendarItemContainer                                   
.RenderingTemplateContainer SPCalendarTabContainer                                    
.RepeatedControls           GenericInformationBar                                     
.SaveButton                 PublishButton                                             
.SaveButton                 SaveAsDraftButton                                         
.SaveButton                 SubmitCommentButton                                       
.SettingsMenu               MWSSettingsMenu                                           
.SimpleQueryControl         PeopleQueryControl                                        
.SingleDataSource           ColumnMergedDataSource                                    
.SPCalendarBase             DailyCalendarView                                         
.SPCalendarBase             MonthlyCalendarView                                       
.SPCompositeControl         DateTimeControl                                           
.SPCompositeControl         RecurrenceDataControl                                     
.SPControl                  AlphaImage                                                
.SPControl                  BpScript                                                  
.SPControl                  CssLink                                                   
.SPControl                  CssRegistration                                           
.SPControl                  CustomJSUrl                                               
.SPControl                  DelegateControl                                           
.SPControl                  FormattedString                                           
.SPControl                  FormDigest                                                
.SPControl                  GroupPermissions                                          
.SPControl                  ListFormPageTitle                                         
.SPControl                  ListItemProperty                                          
.SPControl                  ListProperty                                              
.SPControl                  Navigation                                                
.SPControl                  OWSControl                                                
.SPControl                  OWSForm                                                   
.SPControl                  PortalConnection                                          
.SPControl                  PreReleaseFeedback                                        
.SPControl                  ProjectProperty                                           
.SPControl                  RelatedTasks                                              
.SPControl                  ReturnLink                                                
.SPControl                  RobotsMetaTag                                             
.SPControl                  RssLink                                                   
.SPControl                  ScriptLink                                                
.SPControl                  SoapDiscoveryLink                                         
.SPControl                  SPCalendarNavigator                                       
.SPControl                  TemplateBasedControl                                      
.SPControl                  Theme                                                     
.SPControl                  UrlRedirector                                             
.SPControl                  ViewSearchForm                                            
.SPControl                  ViewSelector                                              
.SPDatePickerControl        SPMonthPickerControl                                      
.SPHelpControlBase          SPHelpBrowserControl                                      
.SPHelpControlBase          SPHelpPagingBarControl                                    
.SPHelpControlBase          SPHelpSearchResultsControl                                
.SPLinkButton               FormButton                                                
.SPLinkButton               MergeButton                                               
.SPLinkButton               RelinkButton                                              
.SPLinkButton               SPToolBarButton                                           
.SPSecurityTrimmedControl   SPLinkButton                                              
.SSOProcessor               SQLSSOProcessor                                           
.SSOProcessor               XMLSSOProcessor                                           
.TemplateBasedControl       FormComponent                                             
.TemplateBasedControl       ListViewSelector                                          
.TemplateBasedControl       PagingButton                                              
.TemplateBasedControl       RecentChangesIterator                                     
.TemplateBasedControl       RecentChangesMenu                                         
.TemplateBasedControl       TemplateContainer                                         
.TemplateBasedControl       ToolBarMenuButton                                         
.TemplateBasedControl       ViewToolBar                                               
.ToolBarMenuButton          ActionsMenu                                               
.ToolBarMenuButton          AllContentsViewSelectorMenu                               
.ToolBarMenuButton          NewMenu                                                   
.ToolBarMenuButton          PersonalActions                                           
.ToolBarMenuButton          SettingsMenu                                              
.ToolBarMenuButton          SiteActions                                               
.ToolBarMenuButton          UploadMenu                                                
.ToolBarMenuButton          ViewSelectorMenu                                          
.UnsecuredLayoutsPageBase   LayoutsPageBase                                           
.UpdateableHierarchicalView SPXmlHierarchicalDataSourceView                           
.UpdateableHierarchicalView XmlUrlHierarchicalDataSourceView                          
.UrlValidator               UrlNameValidator                                          
.UrlValidator               UrlPathValidator                                          
.ViewSelectorMenu           MWSViewSelectorMenu                                       

 

SP 2007 Web Controls ordered by Name

 

All of the following are in Microsoft.SharePoint.WebControls (i.e. Microsoft.SharePoint.WebControls.ActionsMenu)

BaseType                    Name                                                      
--------                    ----                                                      
.ToolBarMenuButton          ActionsMenu                                               
.FormButton                 AlertMeButton                                             
.ToolBarMenuButton          AllContentsViewSelectorMenu                               
.BaseFieldControl           AllDayEventField                                          
.SPControl                  AlphaImage                                                
.FieldMetadata              AppendOnlyHistory                                         
.FormButton                 ApprovalButton                                            
.FormComponent              ApprovalMessage                                           
.FormComponent              ApprovalStatus                                            
.FormComponent              AssignToEmailMessage                                      
.MergedDataSource           ASyncMergedDataSource                                     
.FormButton                 AttachmentButton                                          
.BaseFieldControl           AttachmentsField                                          
.FormComponent              AttachmentUpload                                          
.FormComponent              AttendeeEmailResponse                                     
.BaseFieldControl           AttendeeField                                             
.FormComponent              BackLinksIterator                                         
.BaseFieldControl           BaseChoiceField                                           
.FieldMetadata              BaseFieldControl                                          
.BaseTextField              BaseNumberField                                           
.BaseFieldControl           BaseTextField                                             
.BaseFieldControl           BooleanField                                              
.SPControl                  BpScript                                                  
.BaseFieldControl           CalculatedField                                           
.FormComponent              ChangeContentType                                         
.FormButton                 ChangePasswordButton                                      
.BaseChoiceField            CheckBoxChoiceField                                       
.FormButton                 CheckInCheckOutButton                                     
.FormButton                 ClaimReleaseTaskButton                                    
.SingleDataSource           ColumnMergedDataSource                                    
.FieldMetadata              CompositeField                                            
.BaseFieldControl           ComputedField                                             
.LayoutsPageBase            ContentsPage                                              
.FormComponent              CopySourceInfo                                            
.FormComponent              CopySourceUrlInfo                                         
.FormComponent              CreatedModifiedInfo                                       
.FormComponent              CreationType                                              
.BaseFieldControl           CrossProjectLinkField                                     
.SPControl                  CssLink                                                   
.SPControl                  CssRegistration                                           
.BaseNumberField            CurrencyField                                             
.SPControl                  CustomJSUrl                                               
.SPCalendarBase             DailyCalendarView                                         
.AdministrationDataSourc... DataTableDataSourceView                                   
.SPCompositeControl         DateTimeControl                                           
.BaseFieldControl           DateTimeField                                             
.SPControl                  DelegateControl                                           
.FormButton                 DeleteItemButton                                          
.FormButton                 DeleteItemVersionButton                                   
.FormComponent              DiffSelectorIterator                                      
.ApprovalButton             DistributionListsApprovalButton                           
.FormComponent              DocumentLibraryFields                                     
.FormComponent              DocumentTransformersInfo                                  
.BaseChoiceField            DropDownChoiceField                                       
.FormButton                 EditItemButton                                            
.FormButton                 EditSeriesButton                                          
.FormComponent              EmailCalendarMessage                                      
.FormButton                 EnterFolderButton                                         
.EntityEditor               EntityEditorWithPicker                                    
.FormButton                 ExportWebPartButton                                       
.MenuTemplate               FeatureMenuTemplate                                       
.FieldMetadata              FieldDescription                                          
.FieldMetadata              FieldLabel                                                
.FormComponent              FieldMetadata                                             
.FieldMetadata              FieldProperty                                             
.BaseFieldControl           FieldValue                                                
.BaseFieldControl           FileField                                                 
.FormComponent              FileUploadedMessage                                       
.FormComponent              FolderFormFields                                          
.SPControl                  FormattedString                                           
.SPLinkButton               FormButton                                                
.TemplateBasedControl       FormComponent                                             
.SPControl                  FormDigest                                                
.BaseFieldControl           FormField                                                 
.FormComponent              FormToolBar                                               
.RepeatedControls           GenericInformationBar                                     
.ActionsMenu                GlobalGalleryActionsMenu                                  
.FormComponent              GoBackButton                                              
.FormComponent              GoToCopySourceLink                                        
.SPControl                  GroupPermissions                                          
.HtcMenuItem                HtcMenuOption                                             
.HtcMenuItem                HtcMenuSeparator                                          
.HtcMenuItem                HtcSubMenu                                                
.FormComponent              InformationBar                                            
.FormComponent              InitContentType                                           
.FormComponent              ItemHiddenVersion                                         
.UnsecuredLayoutsPageBase   LayoutsPageBase                                           
.FormComponent              ListFieldIterator                                         
.SPControl                  ListFormPageTitle                                         
.SPControl                  ListItemProperty                                          
.SPControl                  ListProperty                                              
.TemplateBasedControl       ListViewSelector                                          
.BaseFieldControl           LookupField                                               
.FormButton                 ManageCopiesButton                                        
.FormButton                 ManagePermissionsButton                                   
.SPLinkButton               MergeButton                                               
.IDataSourceConsumer        MergedDataSource                                          
.SPCalendarBase             MonthlyCalendarView                                       
.DatePicker                 MonthPicker                                               
.GoBackButton               MultiPageGoBackButton                                     
.LookupField                MultipleLookupField                                       
.ActionsMenu                MWSActionsMenu                                            
.ListViewSelector           MWSListViewSelector                                       
.NewMenu                    MWSNewMenu                                                
.SettingsMenu               MWSSettingsMenu                                           
.ViewSelectorMenu           MWSViewSelectorMenu                                       
.FormButton                 MyAlertsButton                                            
.FormButton                 MyRegionalSettingsButton                                  
.SPControl                  Navigation                                                
.FormButton                 NewItemButton                                             
.ToolBarMenuButton          NewMenu                                                   
.FormComponent              NextPageButton                                            
.BaseTextField              NoteField                                                 
.BaseNumberField            NumberField                                               
.SPControl                  OWSControl                                                
.OWSControl                 OWSDateField                                              
.SPControl                  OWSForm                                                   
.OWSControl                 OWSNumberField                                            
.OWSControl                 OWSSubmitButton                                           
.TemplateBasedControl       PagingButton                                              
.BaseFieldControl           ParentInformationField                                    
.InputFormRequiredFieldV... PasswordTextBoxValidator                                  
.EntityEditorWithPicker     PeopleEditor                                              
.PickerDialog               PeoplePickerDialog                                        
.SimpleQueryControl         PeopleQueryControl                                        
.ContextSelector`1[T]       PersistedObjectContextSelector`1                          
.ToolBarMenuButton          PersonalActions                                           
.SPControl                  PortalConnection                                          
.SPControl                  PreReleaseFeedback                                        
.SPControl                  ProjectProperty                                           
.SaveButton                 PublishButton                                             
.BaseChoiceField            RadioButtonChoiceField                                    
.BaseFieldControl           RatingScaleField                                          
.TemplateBasedControl       RecentChangesIterator                                     
.TemplateBasedControl       RecentChangesMenu                                         
.SPCompositeControl         RecurrenceDataControl                                     
.BaseFieldControl           RecurrenceField                                           
.SPControl                  RelatedTasks                                              
.SPLinkButton               RelinkButton                                              
.FormComponent              RequiredFieldMessage                                      
.FormButton                 RestoreItemVersionButton                                  
.SPControl                  ReturnLink                                                
.NoteField                  RichTextField                                             
.SPControl                  RobotsMetaTag                                             
.SPControl                  RssLink                                                   
.SaveButton                 SaveAsDraftButton                                         
.FormComponent              SaveButton                                                
.SPControl                  ScriptLink                                                
.PersistedObjectContextS... ServerSelector                                            
.ToolBarMenuButton          SettingsMenu                                              
.PickerQueryControlBase     SimpleQueryControl                                        
.IDataSourceConsumer        SingleDataSource                                          
.ToolBarMenuButton          SiteActions                                               
.ContextSelector`1[Micro... SiteAdministrationSelector                                
.BaseXmlDataSource          SoapDataSource                                            
.SPControl                  SoapDiscoveryLink                                         
.RenderingTemplateContainer SPCalendarContainer                                       
.RenderingTemplateContainer SPCalendarItemContainer                                   
.SPControl                  SPCalendarNavigator                                       
.RenderingTemplateContainer SPCalendarTabContainer                                    
.SPHelpControlBase          SPHelpBrowserControl                                      
.SPHelpControlBase          SPHelpPagingBarControl                                    
.SPHelpControlBase          SPHelpSearchResultsControl                                
.SPSecurityTrimmedControl   SPLinkButton                                              
.HtcMenu                    SPMenu                                                    
.HtcMenuOption              SPMenuOption                                              
.FormDigest                 SPMobileFormDigest                                        
.SPDatePickerControl        SPMonthPickerControl                                      
.SPLinkButton               SPToolBarButton                                           
.BaseXmlDataSource          SPXmlDataSource                                           
.UpdateableHierarchicalView SPXmlHierarchicalDataSourceView                           
.SSOProcessor               SQLSSOProcessor                                           
.SaveButton                 SubmitCommentButton                                       
.ListFieldIterator          SurveyFieldIterator                                       
.MergedDataSource           SyncMergedDataSource                                      
.PickerResultControlBase    TableResultControl                                        
.SPControl                  TemplateBasedControl                                      
.TemplateBasedControl       TemplateContainer                                         
.BaseTextField              TextField                                                 
.SPControl                  Theme                                                     
.TemplateBasedControl       ToolBarMenuButton                                         
.FormComponent              UnlinkCopyButton                                          
.ToolBarMenuButton          UploadMenu                                                
.BaseFieldControl           UrlField                                                  
.UrlValidator               UrlNameValidator                                          
.UrlValidator               UrlPathValidator                                          
.SPControl                  UrlRedirector                                             
.InputFormCustomValidator   UrlValidator                                              
.BaseFieldControl           UserField                                                 
.FormButton                 UserInfoListDeleteItemButton                              
.FormButton                 UserInfoListEditItemButton                                
.FormComponent              UserInfoListFormToolBar                                   
.FormComponent              VersionDiff                                               
.ListFieldIterator          VersionDiffIterator                                       
.FormButton                 VersionHistoryButton                                      
.AlphaImage                 ViewIcon                                                  
.SPControl                  ViewSearchForm                                            
.SPControl                  ViewSelector                                              
.ToolBarMenuButton          ViewSelectorMenu                                          
.TemplateBasedControl       ViewToolBar                                               
.FormButton                 ViewWebPartXmlButton                                      
.PersistedObjectContextS... WebApplicationSelector                                    
.FormComponent              WebPartPageMaintenanceMessage                             
.DailyCalendarView          WeeklyCalendarView                                        
.EditItemButton             WikiEditButton                                            
.EditItemButton             WikiEditItemButton                                        
.FileField                  WikiFileField                                             
.FormButton                 WikiIncomingLinksButton                                   
.FormButton                 WikiPageHistoryButton                                     
.FormComponent              WorkflowForm                                              
.FormButton                 WorkflowsButton                                           
.SSOProcessor               XMLSSOProcessor                                           
.BaseXmlDataSource          XmlUrlDataSource                                          
.UpdateableHierarchicalView XmlUrlHierarchicalDataSourceView                          

 

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.