Archive for category: MOSS - Object Model

Microsoft Office Sharepoitn Server

Retrieve current user profile in Sharepoint 2007

27 July, 2009 (10:12) | MOSS - Object Model | By: G Vijai Kumar

My last post was about Contact / Feedback webpart for Sharepoint 2007
In this post I am going to show you how to retrieve current user profile and show the properties like Title, First name, Last Name etc.
using Microsoft.Office.Server.UserProfiles.UserProfileManager()
It is a collection of user profile objects used to access user profile data we need to just [...]

Contact / Feedback webpart for Sharepoint 2007

25 July, 2009 (16:09) | MOSS - Object Model | By: G Vijai Kumar

On 12th November, 2009 I have published the Contact / Feedback webpart solution on to Codeplex
You can download the Contact / Feedback webpart from http://contact.codeplex.com/
Comments on this solution are very much appreciated
Thanks for looking into this

Displaying Sharepoint Custom List items in SPGridView

14 July, 2009 (17:08) | MOSS - Object Model | By: GVK

Here is a simple SPGridView example, which displays rows from a Sharepoint Custom List.
Download complete source code

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

namespace FiveNumber
{
[Guid("e6a48f2e-8f31-4738-8ed6-6629f985956d")]
public class DisplayListInSpGridView : System.Web.UI.WebControls.WebParts.WebPart
{
SPGridView myGridView;
[...]

Lightbox enabled custom webpart, displays images from sharepoint picture library

23 October, 2008 (12:52) | MOSS - Object Model | By: GVK

Here is the simple Lightbox enabled custom webpart which displays the images from sharepoint picture library.
Instructions to use:

Download Lightbox
After downloading, copy all the Lightbox files or folders to sharepoint 2007 website using sharepoint designer 2007.
Add the lightbox javascript and css reference tags in the head section of sharepoint site master page.

Create a Picture Library in [...]

Custom Webpart – Displays the latest image from picture library

13 October, 2008 (09:51) | MOSS - Object Model | By: GVK

Here is the simple custom webpart which displays the latest image from picture library.
Download 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.WebPartPages;
namespace LatestImage
{
[Guid("8c21451d-1763-4a7f-817c-f4330a5b1fd8")]
public class LatestImage : System.Web.UI.WebControls.WebParts.WebPart
{
Image myimage = new Image();
[...]