Skip to main content

Posts

Showing posts from 2011

Share point Validation

The  Microsoft.SharePoint.WebControls  namespace of the   Microsoft.SharePoint.dll  contains a number of validation controls that can be used on application pages and web parts to validate user entry in the SharePoint controls. The different validation controls are: InputFormRequiredFieldValidator InputFormRangeValidator InputFormCompareValidator InputFormRegularExpressionValidator InputFormCheckBoxListValidator InputFormCustomValidator If you want to use these SharePoint control validators, you have to add a page directive to the page: <%@ Register TagPrefix="spuc" Namespace="Microsoft.SharePoint.WebControls"              Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> The following sections describe the use of the different SharePoint validation controls. The InputFormRequiredFieldValidator control This control inherits from the standard ASP.NET  RequiredFieldValidator 

Using the SharePoint 2010 Modal Dialog

SharePoint 2010 introduces the new dialog framework which helps users stay in context of the page without navigating away from the page. Yes, the modal dialogs that pop up: The JavaScript client object model provides the  SP.UI.ModalDialog  class to work with the dialog framework. In order to work with the dialog framework, we need to first create the dialog options: var options = SP.UI.$create_DialogOptions(); options.width = 500; options.height = 250; options.url = "/_layouts/StandardsPortal/ChangePassword.aspx" ; options.dialogReturnValueCallback = Function.createDelegate( null , portal_modalDialogClosedCallback); As you can see from the above code, we set options on width, height and what is the URL the modal dialog should load. In this case, an Application Page. Notice that we also initialize the callback. Once the options are set, you can now show the modal dialog: SP.UI.ModalDialog.showModalDialog(options); Now warp this code into a funct

Remote Debugging Sharepoint 2010 Solutions

Just spent an unreasonable amount of time getting remote debugging working with Sharepoint 2010 Sandbox *AND* Full-Trust solutions. It took quite a bit of work for me to understand and troubleshoot, so thought I would write it down: a. for my own future reference b. so others don’t have to go through the same heartache The general approach for sandbox and full trust solutions is the same, but they do differ in a few details. A post by tlhost on the Microsoft Forums titled A SharePoint server is not installed on this computer got me 90% of the way there, this is just filling in the gaps that tripped me up. And a BIG THANK YOU to Pav – he helped a ton Export Nodes from Sharepoint Machine Registry Remote to the Sharepoint machine, run regedit and export [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0] On your development machine, run regedit and import the nodes. Create Sharepoint project You will now be able to create a Sharepoint Proj

30+ SharePoint Custom Actions Location and Sample

Adding Custom Actions in SharePoint is a straightforward process - MSDN has excellent   example   on how to add Custom Actions to various menus through a SharePoint Feature. The following guide provide complete reference for developer to examine the locations, group IDs and sample screenshots that are used in defining the  CustomAction   elements of custom actions. Additionally, you can download solution package (WSP) and source codes here: Sky Drive  - CustomWare.SharePoint.CustomActionSample.zip Part 2 show examples of custom actions for SharePoint Central Administration Application Management and Operation page. In Part 3, you'll find additional missing custom actions group IDs and locations in MSDN for Sharepoint Central Administration Shared Service Administration page. Part 2 - SharePoint Central Administration Application Management and Operation page Part 3 - Sharepoint Central Administration Shared Service Administration page Per-item edit control blo