10/10/2010

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                          

 

 

.

10/07/2010

Chat About Microsoft Office and Windows with Microsoft MVP Experts

 

Office 2010 and Windows 7

 

Chat About Microsoft Office and Windows with Microsoft MVP Experts

October 14, 2010
10:00 A.M. - 11:00 A.M. Pacific Time
Additional Time Zones

Would you like to learn more about the cool new features in Office 2010 and Windows 7 and what has changed since previous versions? Do you use Microsoft Office but would like to learn tips and tricks to be more productive at home, school or at work? Perhaps you are a new user who has questions on how to get started with Windows 7 or using the Office ribbon? Or would like to learn how to protect your computer from malware and viruses. Or perhaps you are just stuck and need answers.

The Microsoft Most Valuable Professionals (MVPs) are here to help!

The MVPs are the same people you see in the technical community as authors, trainers, user groups leaders and answerers in the Microsoft forums. For the first time ever we have brought these experts together as a collective group to answer your questions live. MVPs will be on hand to take questions about Microsoft Office 2010 or Office 2007 products such as Word, Excel, PowerPoint, Outlook, Access, Project, OneNote and more. As well as the Windows 7 and earlier versions such as Windows Vista. In addition to Microsoft Office, the chat will cover Windows related topics such as upgrading, setup and installation, securing your PC, Internet Explorer, personalizing your computer desktop or having fun with Windows Live Essentials to share photos, make movies and more. All levels of experience are welcome from beginners and students to intermediate power users.

Please join us for this informative Q&A style chat and bring on your basic and your tough questions!

Join the Chat!


October 14, 2010

10:00 A.M. - 11:00 A.M. Pacific Time
Additional Time Zones

Add to Calendar

You can follow this on Twitter at #msmvpchat

Join the event on Facebook: Chat about Microsoft Office & Windows with MVP Experts!

 

.

Cool tool! Disk2vhd

 

A few weeks ago my laptop had to go back for service.  I needed to back it up, but I also needed to keep working with everything installed on that laptop. Windows Sysinternals to the rescue. A tool named Disk2vhd does just what it’s name implies, it copies a disk to a VHD. Not only that, but it copies a live, in use, disk to a VHD.  I downloaded Disk2vhd, fired it up and copied my laptop’s drive C: to a VHD on my server. I made a 2nd copy on the server as a backup, then opened the VHD in Hyper-V. I had a running clone of my laptop!  I was able to continue working, minus portability, on my “laptop” while it was physically away being repaired.

Pretty cool!

 

Download it here:

http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx

 

.

10/06/2010

Cincinnati SharePoint User Group Meeting

 

First Thursday of every month!  Next meeting is this week: 10/7/10

 

Click here for info about this month’s meeting: http://www.CincinnatiSPUG.org

We have door prizes!  In addition to free pizza, we usually have a number of SharePoint books, mice, Windows 7 Ultimate and other goodies to give away!

See you there!

 

.

10/03/2010

SharePoint 2010: Playing with the Multilingual User Interface with JavaScript

 

I was doing some testing with the new SharePoint 2010 “multilingual user interface” (MUI) feature. If you have not seen this yet, Google/Bing it. In playing with this I got to thinking that no typical user would ever discover it. I can just see SharePoint sites everywhere with a block of text on every home page with instructions: “How to change the language settings…”. So after we get past some background on MUI, I’ll show what I’ve been playing with for user interfaces.

 

In case you have not, here’s some quick background.

  • You must have language packs installed for each language
  • There is no user language detection– a user must pick the language
  • User created text (list and library content) is not multilingual
  • Help files and administration pages are multilingual
  • Site title, Quick Launch and Tab text can be entered in each language
  • Managed metadata supports multiple languages
  • Text can be exported for translation and then imported
  • Search indexes sites in the default language of the SharePoint installation – the other languages are ignored
  • Web Part titles and descriptions do not change in the user interface, unless a Web Part is a list-based Web Part
  • Here’s a good place to start: http://technet.microsoft.com/en-us/library/ff805062.aspx

Here’s a site that was created in English, but has French enabled:

image

Here’s the same site after the user has selected French.

image

The site title has not changed, but can! Just edit it while in “French mode” and you will then have a title for each language.

Notice the page content and any content typed into lists and libraries has not changed.

 

Steps to get things setup:

  1. Install the language packs on your web servers (Each language needs to downloaded and installed separately).
  2. Turn on support for multiple languages: Site Actions, Site Settings, Language Settings (Must be done for each site!)
  3. Test by going to the Welcome menu (the “your name” dropdown at the top right of the page) and clicking Select Display Language.

image

 

And there’s the problem!

 

As you can see in the screen above, the user has to “discover” that language options in the Welcome menu. How many new SharePoint users do you know that will ever click on their name at the top of the page?

Turns out the mechanism for language selection is quite simple. The link above just calls a JavaScript function that stores a cookie and then reloads the page.  You can do your own language selection either by creating your own cookie (not the best idea) or calling SharePoint’s built-in function.

To select French just call:

    OnSelectionChange(1036)

The number, 1036, is Microsoft’s “Locale Id” for “French-France”.  For a list of these IDs see: http://technet.microsoft.com/en-us/library/ff805062.aspx 

Note that these numbers only meaningful if you have the appropriate language packs installed.

If you want to see how they set the cookie, view the source of the the page and search for “function OnSelectionChagne”.

 

Adding your own buttons and links…

Any place where you can add HTML you can add buttons to select a language. These include the Content Editor Web Part, SharePoint Designer and else where.

For example:

<button onclick="OnSelectionChange(1036)"> French </button>
<button onclick="OnSelectionChange(1033)"> English </button>

image

 

Adding to Quick Launch and Top Link Bar

Yes, you can add JavaScript to Quick Launch and the Top Link Bar, except for Publishing Sites that is. For more info see here: http://techtrainingnotes.blogspot.com/2010/10/sharepoint-javascript-in-quick-launch.html

 

image

 

All you need to do is add the “JavaScript: OnSelectionChange(1036)” as the hyperlink!

image

 

 

 

.

10/02/2010

SharePoint: JavaScript in Quick Launch and Top Link Bar!

 

Update: SharePoint 2010 users can use these same techniques to display a page in a SharePoint dialog box. See here: http://techtrainingnotes.blogspot.com/2010/12/sharepoint-opening-2010-dialog-box-from.html

 

Pretty scary! After five years of working with SharePoint 2007 I’m still finding new tricks! (Yes, 12,000 people probably have already found this… but I just did!)

 

Did you know….

                                      you can put JavaScript in Quick Launch and Top Link Bar links?

 

Should have been obvious (hit’s self in head).  Where you can have “http://” you can generally have “JavaScript:”.

Example:

            <A HREF=”http://www.maxtrain.com”>  Click here </A>

            <A HREF=”JavaScript:alert(‘hi there!’)”>  Click here </A>

 

Before you go on… this works in SharePoint 2007 and SharePoint 2010, in both Quick Launch and Top Link Bar, but only in non-publishing based sites. (see the end of this article)

 

 

JavaScript in Quick Launch!

For a quick test… go to Site Actions, Site Settings, Quick Launch and add this bit of JavaScript in the URL box:

JavaScript:alert('Hello world!')

(Note: Although “JavaScript” can also be “javascript”, most everything in JavaScript must be in the correct case. You must type “alert” in all lower case.)

image

 

Now test it:

 

image

 

Now what can you do with this?

 

My head overflows with ideas!  Here’s three to start with:

  • Prompt a user before going to a page or site (“Are you sure you …”)
  • Open a link from Quick Launch or the Tabs in a new window
  • Change page languages (in SP 2010)    see here

 

Prompt user before going to a link:

 

Here’s the normal link found in Quick Launch for the Calendar: 
         “/sites/training/secure/Lists/Calendar/calendar.aspx”

image

 

Here’s a link that will prompt to see if you really want to go to the calendar: (all one line!)

JavaScript:if (confirm('do you really want to see the calendar?'))
document.location='/sites/training/secure/Lists/Calendar/calendar.aspx';

image

 

image

 

 

Here’s a more practical link that will prompt to see if you really want to go to an external site: (all one line!)

JavaScript: if ( confirm('This web site is external to the 
company and may not be safe!'
) )
document.location='http://www.google.com';

image

 

Open a link from Quick Launch or the Tabs in a new window

 

javascript: void(window.open('http://www.google.com'));

This example is in SharePoint 2010:

image

 

 

Where does it not work?  Publishing sites!

 

While this trick works from Team Sites and other non-publishing sites, it does not work form an site with the Publishing features enabled. (How do you know? Go to Site Actions, Site Settings, and see if you have “Quick Launch” or “Navigation”.  “Navigation” is for publishing sites.

The problem is the editor popup. It’s checking for things like “http://” and “mailto:” and not accepting “JavaScript”.

 

image

 

 

.

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.