Wednesday, September 9, 2009

What is Microsoft infopath 2007?


Recently I have gone through a good article and I want to share with you.It provides the complete information about microsoft infopath and how to use ?where to use?

http://www.learnthat.com/Software/learn/1375/Microsoft-Infopath-Tutorial-and/
http://www.dotnetspider.com/forum/222333-What-use-infopath-forms.aspx


Wednesday, August 26, 2009

Deleting an item from sharepoint list

If you would like to delete an item from SPListItemCollection in share point,
Use the following code


SPSite site = null;
SPWeb web = null;

try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
site = SPContext.Current.Site;
site.AllowUnsafeUpdates = true;
web = site.OpenWeb();
SPList list = web.Lists["Test"];
SPQuery oQuery = new SPQuery();
oQuery.Query = "" + txtGaugeID.Text + "";
SPListItemCollection oDeleteCollection = list.GetItems(oQuery);
if (oDeleteCollection.Count > 0)
{

for (int i = oDeleteCollection.Count - 1; i > -1; i--)
{
oDeleteCollection.Delete(i);
}
}
});

}
catch (Exception ex)
{
Response.Write(ex.Message);
}

Monday, July 27, 2009

Blocking anonymous users from sharepoint lists

To block the anonymous users from viewing the sharepoint lists add the following code in your web.config file

[CODE][location path="lists"]
[system.web]
[authorization]
[deny users="?"]
[/authorization]
[/SYSTEM.WEB]
[/location][/CODE}

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 //


Friday, July 17, 2009

About sharepoint 2010

Microsoft has recently announced that the new SharePoint version will be called "Microsoft SharePoint 2010."

Recently I have gone through the following video and tutorial in microsoft site.Please have a look at the following link to know more about sharepoint 2010.


http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Overview-Video.aspx

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