Friday, June 26, 2009

Famous websites for shareponit beginners



Please go through the following websites who has interested in learning the sharepoint.And if you any other famous websites related to sharepoint ,please post those urls in comment section.


1)Downloads and sharepoint videos and system requirements for installing share point 2010

http://sharepoint.microsoft.com/Pages/Default.aspx

2)System requirements for installing sharepoint 2010

http://blogs.msdn.com/sharepoint/archive/2009/05/07/announcing-sharepoint-server-2010-preliminary-system-requirements.aspx

3)sharepoint forums

http://social.msdn.microsoft.com/forums/en-US/category/sharepoint/http://www.sharepointforum.com/en-US/Pages/default.aspx

4)sharepoint tutorials
http://www.sharepointhostingprovider.com/sharepoint-tutorials/

http://www.sharepointhq.com/resources/what_is_SP.htm

http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Posts/Post.aspx?List=8d9e2a99%2Df288%2D47c2%2D916b%2D2f32864f7b82&ID=4

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);
}

Monday, June 15, 2009

How to read data from a txt file using c#

Before going to the code ,just know about stream reader

StreamReader:
streamreader is nothing but file pointer and here I used the stream reader to read the data from the text file(.txt) and displaying that it is in a label. System.IO.this is the name space required to deal with the files. To read a text file we need to create the instance of the object,StreamReader The instance will be the file pointer for us. Once we have a File Pointer, we need to invoke the method, OpenText method of the object, File. The method, OpenText takes a string as an argument. The string is nothing but the path of file that is going to get created.
Now, let us see an example.

String filename=Server.MapPath("new.txt");//here in the string we are storing the filepath StreamReader strrr;
strrr=File.OpenText(filename);//here streamreader pointing the files..means stream reader is nothing but a file pointer
lbltxt.Text=str;//here we are displaying the txt file data in the label.
strrr.Close();..
fstring str=strrr.ReadToEnd();

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"));


my posts in different sites

comparing the two dates in c#

common elements from the two arrays

Exporting Datagrid to excel or worddoc using asp.net

Sending email using asp.net1.1

Sql Joins with Examples

Difference between Char, Varchar and Nvarchar.

Connection Pooling in dotnet.

sessions,querystring,application and viewstate.

Thursday, June 11, 2009

What is sharepoint?


1)SharePoint is a web-based collaboration and document management platform from Microsoft. It can be used to host web sites that can be used to access shared workspaces and documents, as well as specialized applications such as wikis, blogs and many other forms of applications, from within a browser. SharePoint functionality is exposed as web parts, such as a task list or discussion pane. These web parts are composed into web pages, which are then hosted in the SharePoint portal. SharePoint sites are actually ASP.NET 2.0 applications, which are served using IIS and use a SQL Server database as data storage backend.


2)SharePoint is an enterprise information portal, from Microsoft, that can be configured to run Intranet, Extranet and Internet sites. Microsoft Office SharePoint Server 2007 allows people, teams and expertise to connect and collaborate. A SharePoint enterprise portal is composed of both SharePoint Portal and Windows SharePoint Services, with SharePoint being built upon WSS. WSS is typically used by small teams, projects and companies. SharePoint Server is designed for individuals, teams and projects within a medium to large company wide enterprise portal.

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)