Skip to main content

Posts

Showing posts from August, 2008

Adding validation to a custom list control in Sharepoint

You should know how to create a Sharepoint list and how to open the site in Sharepoint designer. Following is a list with Email fields. Let's say we have to validate so that only a valid email can be entered. If not valid then the Error Message appears next to the field Now open the site in the sharepoint designer and then expand the list and open the Newform.aspx of the list to be validated As you can see in the image above the Newform.aspx of Validation list is being opened in the sharepoint Designer. Now right click on this Validation list web part in sharepoint Designer and choose Web Part properties. The properties dialog box will open for the Validation list here. Choose Hidden under layout and say ok. (This web part can be deleted as well, but due to some Known problems because of deletion it is best to hide this). Now click exactly underneath the hidden list web part and go to Insert->Sharepoint Controls-> Custom List Form… and Wizard will ask to choose a List or Docu

How to: Create a Minimal Master Page

1. To create a minimal master page Open SharePoint Designer. On the File menu, click New, point to SharePoint Content, and then click the Page tab. Double-click Master Page to create a new master page. Click Design to show the master page in design view. You should see header and left margin areas and several content placeholders in the master page. Click Code to show the master page in code view. Copy the following code into the master page. Xml <%-- Identifies this page as a .master page written in Microsoft Visual C# and registers tag prefixes, namespaces, assemblies, and controls. --%> <%@ Master language="C#" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint&qu

Create a Feature: Add Custom Master Pages to your Site Collections

One way master pages can be stored and used in MOSS 2007 sites is through creation in SharePoint Designer and storage in the Master Page Gallery. This method will create a master page in the content database. But what if you need to use one or two master page across multiple site collections? For ease of updates and maintenance, we don't necessarily want to store a copy of the master page in each site collection. Instead we can create and store master pages on the file system as a SharePoint Feature and make it available for new and existing site collections. http://heathersolomon.com/blog/articles/servermstpageforsitecollect_feature.aspx