Skip to main content

Posts

Showing posts from January, 2011

Difference between User Control and Custom Control

User Control can access only within the current application,if u want to access the user control to other application,u want to copy that user control to that application. Custom control can access from any application becs it is stored in GAC(Global Assembly Cache). We can add the custom control to Visual studio IDE toolbox,but user control can't. User control is good for static layout Custom control is good for dynamic layout. User Control will appear in the Solution Explorer where as custom control will appear in the toolbox, the significant of both controls is re-usability.User control will use with in the application where as Custom Control will use in any application because it is in the tool box. Extending the functionality of the existing control is Custom Control and grouping up of existing controls for desired out put is user control.  

Problems using WSS Extensions for Visual Studio

ERROR: “ This solution contains two assemblies with the same name, or the SharePoint server already has an assembly with the specified name .” when deploying a solution using the Visual Studio Extensions for SharePoint (VSEWSS) after you have already deployed it to a different site on the same server. Resolution: - Remove the solution’s assembly from the Global Assembly Cache (GAC). - Gacutil –uf assemblyName   (note: no .dll extension is specified) - Rename or Remove the feature from “Program Files\Common Files\Microsoft Shared\ web server extensions\TEMPLATE\FEATURES\FeatureName”  //FeatureName may not be the same as assembly name – look in your manifest.xml to find the correct name ERROR: When trying to deploy a VSEWSS solution using the Visual Studio “Deploy” command you receive the error “Value does not fall within the expected range .” Resolution: Remove all projects except the VSEWSS project from the Visual Studio solution then attempt your deploy...

This solution contains two assemblies with the same name, or the SharePoint server already has an assembly with the specified name.

If you prompted for an error " This solution contains two assemblies with the same name, or the SharePoint server already has an assembly with the specified name ." at the time of deploying a custom web part or any component in sharepoint as the solution you have to do this : 1. See if the feature that you're trying to add still exists in the " \Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES " path. Delete it. 2. Uninstall the particular Assembly from c:\windows\assembly folder too . 3. Try to deploy it again.

Modify a Master Page in SharePoint Designer 2007

Connecting Custom Webparts in Moss 2007

Introduction SharePoint is a rich and powerful platform for both users and developers. We can customize and enrich SharePoint in many ways. One of the common ways is creating custom Web Parts. With a custom Web Part, we can implement our features quick and clean. One of the useful features of MOSS Web Parts is the ability to send and receive parameters. We can easily filter a data view Web Part according to the results of another Web Part. It's good to know that we can connect our custom Web Parts as well. Requirements The Web Part created in this article will use Windows SharePoint Services 3.0. It will also work with MOSS 2007. To create the Web Part, we will be using Visual Studio 2005 installed on Windows Server 2003 with Extension for Windows SharePoint Services version 1.1 (you can also use Visual Studio 2008 with the Extension of WSS version 1.2). WSS or MOSS is also installed. You can use Microsoft Virtual PC for setting up such an environment in your development machine. ...
Content Type: A content type is an object that is stored within MOSS that defines several elements of a piece of content, including: Document Template that the content will be based on Columns that the content will have associated with it (metadata) Workflows that the content will use Information Management policies that apply to the content Conversion types for the content This picture shows the site-wide admin interface for managing content types Every piece of list or library content in MOSS is created from a content type. There are a load of out-of-the-box content types like ‘Blank Document’ or ‘Announcement’ and you can create your own (without any code or customisation, it is done through the admin UI). So how do you apply them? Content Types are created centrally and then they can be applied to lists and libraries throughout your site. This picture shows the list-based interface for adding content types to a list or library What does this mean for users? ...

How to attach/delete/upload files to SharePoint List Item using Object Model

I have one requirement in which I need to develop a web part in which users can upload multiple documents to SharePoint List Item and they can see all uploaded files into data grid control , they also need facility for user to delete selected files , add new files from same control and also they can download files . Here in this post, I am writing code for each functionality as per my requirements. Code of Deleting attachment from SharePoint list item :   private void DeleteAttachment(int NodeID, String strFileName)     {         try         {             SPContext.Current.Web.AllowUnsafeUpdates = true;             SPListItem delItem = lstAudit.GetItemById(NodeID);             SPAttachmentCollection atCol = delItem.Att...

Most Important Sharepoint Sites Links..

Microsoft Virtual Labs : TechNet Virtual Labs : 2007 Microsoft Office System Microsoft® Office SharePoint® Server 2007 Installation and Configuration Creating Workflows for Windows SharePoint Services Getting Started with the Business Data Catalog in Microsoft® Office SharePoint® Server 2007 Videos : 2007 Office System Video: Portals Conference Videos : Windows SharePoint Services Platform, Collaboration Sharepoint-Screen-Casts Microsoft Most Valuable Professional .

Custom Webpart – Inserts items into Sharepoint Custom list

Here is the simple custom webpart which inserts items into ( Title, Employee Name, Designation ) Sharepoint custom list, before executing the webpart first of all you have to create custom list and required fields manually through UI as said below: Create a custom list, name it as Custom List (you can also choose different name, but make sure to modify the same in the code too) then create columns as mentioned….. Title [Single line text] (this is by default available, no need of re-creating) Employee Name [Single line text] Designation [Single line text] Insert Into Custom List - Input Form Insert Into Custom List - Record Inserted List view displays records after inserting Complete Source Code: using System; using System.Runtime.InteropServices; using System.Web.UI; using System.Web.UI.WebControls.WebParts; using System.Xml.Serialization; using System.Web.UI.WebControls; using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls; using Microsoft.SharePoint....

Site definition?

What is Site Definition? A set of predefined components needs to be included when a site was created in the SharePoint server. The site definition contains the information of Web parts, Lists, Features, and Navigation Bars to be included in the site. Site Definition: By default SharePoint comes with several OOB site definitions which you can select to create your site. In the file system these definitions are available in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates. Each of this site definition consists a XML folder and a Home page (default.aspx). Some of the site definition will be having some more details about the definition which we will walkthrough in more detail later. The XML folder of the site definition contains the ONET.XML (Office .NET) file. This file contains the information about all the web parts, Lists, Features and Navigation Bars. The configuration of this site definitions are defined in another XML file whic...