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
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 = "
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
[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?
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
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#
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#
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
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?
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?
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
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)