Showing posts with label wss3.0.sharepoint. Show all posts
Showing posts with label wss3.0.sharepoint. Show all posts

Friday, July 24, 2009

How to integrate outlook calendar items in sharepoint?

Just follow the following code to view your out look items in sharepoint.
To see the inbox items

//'OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%" style="height: 400px"'

To integrate the outlook calendar

//'OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%" style="height: 400px"'

use the '<>' instead of //


Sunday, June 21, 2009

Uploading images into picture library in sharepoint using c#

Here I explained a sample program to upload image files into picture library

spSite objSite = new SPSite(SPContext.Current.Web.Url);


try
{
byte[] imageData = null;
if (flUpload != null)
{
// This condition checks whether the user has uploaded a file or not
if ((flUpload.PostedFile != null) && (flUpload.PostedFile.ContentLength > 0))
{
Stream MyStream = flUpload.PostedFile.InputStream;
long iLength = MyStream.Length;
imageData = new byte[(int)MyStream.Length];
MyStream.Read(imageData, 0, (int)MyStream.Length);
MyStream.Close();
string filename = System.IO.Path.GetFileName(flUpload.PostedFile.FileName);
using (SPWeb myWeb = objSite.OpenWeb())
{
SPPictureLibrary pic = (SPPictureLibrary)myWeb.Lists["Images"];//Images is the picture library name
SPFileCollection filecol = ((SPPictureLibrary)myWeb.Lists["Images"]).RootFolder.Files;//getting all the files which is in pictire library
filecol.Add(filename , imageData);//uploading the files to picturte library
}
}
}
lblMessage.Text = "Uploaded successfully";
}
catch (Exception ex)
{
Response.Write(ex.Message);
}

Saturday, June 13, 2009

Reading data from sharepoint customlist


Here I explained a simple program for sharepoint beginners which states that reading a data from custom list and bind it to a dropdownlist.

first we have to add microsoft sharepoint dll to our application and import the following name space.

using Microsoft.SharePoint;

declare the following parameters globally.

SPSite objSite;
SPWeb oWeb;
SPList regList
;


and bind the data like this


objSite = new SPSite(SPContext.Current.Site.ID);
oWeb = objSite.OpenWeb("/sitename/");


regList = oWeb.Lists["listname"];
SPListItemCollection oItems = regList.Items;


dt = new DataTable();
dt = oItems.GetDataTable();
ddlTypeCourses.DataSource = dt;
ddlTypeCourses.DataTextField = "Title";
ddlTypeCourses.DataValueField = "Title";
//ddlTypeCourses.Items.Add(new ListItem("-select-", "0"));
ddlTypeCourses.DataBind();
ddlTypeCourses.Items.Insert(0, new ListItem("---Select Course Types---", "0"));


Thursday, June 11, 2009

What is WSS3.0 in sharepoint?

What is WSS3.0 in SharePoint?

Windows SharePoint Services (WSS) is the basic part of Microsoft SharePoint, offering collaboration and document management functionality by means of web portals, by providing a centralized repository for shared documents, as well as browser-based management and administration of them. It allows creation of Document libraries, which are collections of files that can be shared for collaborative editing. SharePoint provides access control and revision control for documents in a library.

It also includes a collection of web parts, which are web widgets that can be embedded into web pages to provide a certain functionality. SharePoint includes web parts such as workspaces and dashboards, navigation tools, lists, alerts (including e-mail alerts), shared calendar, contact lists and discussion boards. It can be configured to return separate content for Intranet, Extranet and Internet locations. It uses a similar permissions model to Microsoft Windows, via groups of users. Active Directory groups can be added to SharePoint groups to easily tie in permissions. Alternatively, other authentication providers can be added through HTML Forms authentication.

Creating the Backup for WSS project in share point?

Creating the Backup for WSS project in share point?
1) open the command prompt
2)type cd\ -ENTER
3)c:\cd “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN” -ENTER
4)then type the following command
Stsadm –o backup –url “yoursiteurl(“http:/test:970”)” -filename “e:\test\backwsss.dat”
Then the backup will be created in the test folder with the name of backwss.dat
If u want to create the restore the use the RESTORE instead of BACKUP

Wednesday, June 10, 2009

Difference between SharePoint Web Application vs Site Collection vs Site vs Sub site

In technical terms, this is a web site in IIS (with an application pool associated). A web application needs to have at least 1 Site Collection. The Site Collection is the root site of the web site. Below the Site Collection, there can be one or more Sites. And a Site can contains sub sites.
An overview:
1. Web Application
1.1 Site Collection (SPSite)
1.1.1 Site (SPWeb)
1.1.2 Site (SPWeb)
1.2 Site Collection (SPSite)
1.2.1 Site (SPWeb)
1.2.1.1 Sub Site (SPWeb)
1.2.1.2 Sub Site (SPWeb)