Visit our SharePoint Forum

SharePoint developer? Submit Yourself as Freelancer

Showing posts with label WebParts. Show all posts
Showing posts with label WebParts. Show all posts

Friday, April 25, 2008

Free WebParts

Some Free WebPart's
http://www.sharepointcustomization.com/resources/wpsamples.htm

Custom Search WebPart:
http://blogs.msdn.com/nigelbridport/archive/2005/12/07/500943.aspx

Thursday, March 27, 2008

Deploy Webpart as Solution Package and Feature

A quick and easy way is to create a WebPart using VseWSS extenstions. This will create all the files needed for deploying your webpart including elements.xml, feature.xml, manifest.xml along with your solution package i.e. .wsp file.

For Step-by-Step explanation See :

Create and Deploy Webpart as Solution Package and Feature

Sunday, March 23, 2008

Custom Calendar Webpart,With colors

Please see my post at theSharePointmarket.com. I also have added the missing CAMl query. Click the link below for full code.

Custom Calendar WebPart

Sunday, March 9, 2008

Download Calandar Webpart, Displays Event Details OnMouseOver

Calendar Web Part enables you to view all schedules in a compact and comfortable view. See all your appointments by putting the mouse over the day you are interested in. Calendar Web Part may be connected to any list on WSS 3.0/MOSS 2007 site.

You Can download from : http://software.techrepublic.com.com/download.aspx?&q=Sharepoint+Calendar+Web+Part+%28zip%29&docid=333854&promo=100511

Tuesday, February 19, 2008

Deploy a WebPart in Sharepoint Site

See Step-by-Step example Here
There are many ways to deploy a Webpart in SharePoint sites.
The easiest method is, when you want to deploy a "Sharepoint Webpart" in a given SharePoint site.

Lets Disscus this easy method:

To Deploy a Sharepoint webpart ,folow the steps below:

1. Create a Sharepoint Webpart Project. The Code for which would look like:

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

namespace Web_part1
{
[Guid("ab8354bd-824b-4dfd-a996-4c0324a1bb95")]
public class Web_Part1 : System.Web.UI.WebControls.WebParts.WebPart
{
public Web_Part1()
{
this.ExportMode = WebPartExportMode.All;
}
protected override void Render(HtmlTextWriter writer)
{
writer.Write("Hi, This a test for WebPart deployment!");
}
} }


2. Next we will give the Assembly, a Strong name by assigning it a Public key value. To do that Right Click on the project title(in Solution Explorer Window) and go to Properties.
Go to Signing tab, and select a key in dropdown Or you can create a new public key(using sn.exe tool) and then browse it in "signing key file name" field.

3. Now go to Debug tab and select "Start browser with Url" option and write the url of the Sharepoint site, where you want to deploy the Webpart.





4. And now you are all set, Just right click on the project in Solution Explorer again and click deploy.

5. Open the sharepoint site and add a new WebPart page(Site Settings->WebPart pages). ADD a your Webpart into the site and you would see the message "Hi, This a test for WebPart deployment!"

See Step-by-Step example Here

Sunday, February 3, 2008

Create Web Part for Sharepoint With User Control

Brief:
To Create a Web Part for sharepoint sites, Create a User control in Visual studio(handling all the events). Drag it into a sharepoint Webpart application(project). And Finally, Deploy the webpart into sharepoint site.

Steps are:

1. Create a blank web application and add a web user control (name WebUserControl1.ascx) into it.

2. Add one TextField and a Button to the user control. The ids of these controls are TextBox1 and Button1 respectively.

3. Add a button1_click even in codebehind file of WebUserControl1 , i.e. WebUserControl1.cs
Like:
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "I am in Web part -> In user control ";
}

3. Now copy this user control to a new folder,name it "controls".The folder should be placed under your (Web Application)
path.eg: “C:\Inetpub\wwwroot\wss\VirtualDirectories\80\controls\”.

4. Create a New Web part application using Visual Studio SharePoint Web Part template.

And The code in Web part application goes below:

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
namespace WepPart_Usercontrol
{
[Guid("68dd6b12-7b2d-4dc8-941f-80acbf83f16f")]

public class WepPart_Usercontrol : System.Web.UI.WebControls.WebParts.WebPart
{

UserControl userControl;

public WepPart_Usercontrol()
{
this.ExportMode = WebPartExportMode.All;
}

protected override void Render(HtmlTextWriter writer)
{
userControl.RenderControl(writer);
}
protected override void CreateChildControls()
{

base.CreateChildControls();
userControl = (UserControl)Page.LoadControl(@"/controls/WebUserControl1.ascx");
Controls.Add(userControl);
}


}
}



SharePoint Programming