Archive for tag: Custom Webparts

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();
[...]

Programatically delete list or library in sharepoint 2007

13 October, 2008 (07:46) | MOSS - Object Model | By: GVK

Here is the simple code for deleting list or library in sharepoint 2007
Download the code

Custom Webpart – Inserts items into sharepoint custom list

10 October, 2008 (14:37) | MOSS - Object Model | By: GVK

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 [...]