Every list in share point has a view to display the contents. We can change or we can create the new view through UI. we can also change the default list view through coding also.the below code shows how to change the default view of a list.
//Change the default list view of a string in share point
private static void ChangeListDefaultView(SPList list)
{
...


Monday, February 28, 2011
Display Created and modified details of a list item in share point through coding.
11:24 PM
Posted by Suresh Pydi
In share point the list item will store the details of the created and modified details of the user by using the user credentials details. It will store as "number#user name" format.here the number is a system defined key to get the user details while using the people picker. So we need to eliminate the number and display only the user name. The details are stored internally created...
Add attachment to a list in share point
11:11 PM
Posted by Suresh Pydi
In share point we can upload the documents to the document library. this will be possible through the UI and through coding also. The below code shows how to add the documents to a list.
//Add attachments to document library.
private static void AddItemsToDocumentLibrary(SPWeb currentWeb)
{
string fileName = string.Empty;
long fileStreamLength;
...
Sunday, February 27, 2011
Hide content types of a list in share point programmatically.(Hide the content types in new button drop down in the share point list)
6:01 PM
Posted by Suresh Pydi
In share point list contains the content types. The available content types will be available on the new button drop down list. Programmatically we can hide the content types available in the list. The code shown shown below.
//hide the content types of a list in the new button drop down list
private static void HideContentType(SPList list)
{
string contentTypeName = string.Empty;
...
Delete content types in share point list (Remove the options under the new button dropdown in share point list)
5:28 PM
Posted by Suresh Pydi
In my previous post i was published how to add the content types to a list in share point. It is also possible to delete the content types in the share point lists. The following code deletes the required content types in the list.
//delete content types from a list
private static void DeleteContentType(SPWeb currentWeb)
{
string listTitle = string.Empty;
SPList currentList;
...
Add Content type to a list in share point (Show content types under new button drop down for a list)
1:15 AM
Posted by Suresh Pydi
In the list we have new option in the menu.By using that new button we will generate the new item. Recently i have a requirement that to add new content types to all the websites in the site. It will take lot of time to go through ui. Programatically it will become easy to update the all the lists in the web.
This is the code to add the list contents in share point lists
//add...
Display permissions assigned to a list programmatically
12:21 AM
Posted by Suresh Pydi
In my prevoius post explained how to display the views that assigned to a list. By that you can get the views assigned to a perticular list. then what about the permissions assigned to a list. Share point people also described a class for permissions as SPPermissions. But later they extended the SPPermissions class and they deprecated SPPermissions class. But still it is available...
Saturday, February 26, 2011
Display list views in sharepoint programmatically
10:54 PM
Posted by Suresh Pydi
In Share point each list has own view and through that the user can get the information as per his required view. We can add the views and delete the views in share point. Through program we can get what are the views available in the list.
By using the following code we can get the views available in the list
// Get the list the list and display the views...
SharePoint - Delete and update list items programmatically and Collection modified Exception
5:50 PM
Posted by Suresh Pydi
In One of my exercise there is a requirement to delete the list items in SharePoint programmatically. For that we need to search the entire list item collection in the list.By Deleting the item in the list we need to break the loop. Because in the SharePoint the collection will be reloaded in the memory, and the list collection is not available for looping....
SharePoint - Adding list Items Programmatically
4:52 PM
Posted by Suresh Pydi
Every list the SharePoint has list items. SPListItemCollection object is used to get the all list items in SharePoint .SPListItem is the class is used to store the list items. We can do the operations on list items through coding in SharePoint.
code snippet to Add the list items to list in SharePoint.
// Get The Lists in the site and add the items...
Show list details in SharePoint
4:18 PM
Posted by Suresh Pydi
In SharePoint the lists and libraries are main parts. To get the list details regarding the list title and the list description there are predefined properties are created by the the SharePoint developers. I was implemented the following code in visual studio console application before using that you need to have the SharePoint reference. You can get...
Friday, February 25, 2011
asp page lifecycle
7:11 AM
Posted by Suresh Pydi

ASP.NET Page Life Cycle Overview
When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running...
Subscribe to:
Posts (Atom)
Follow us in facebook
About Me
- Suresh Pydi
- Having good experience in SharePoint 2007/2010 and .net applications. Currently, working on SharePoint 2013 and training people on SharePoint. Microsoft certified technology specialist, Microsoft Certified Professional developer in SharePoint 2010.
Add me in linked-in
Blog Views
944826
Blog Archive
-
▼
2011
(20)
-
▼
February
(17)
- Change the default view of a list programmatically...
- Display Created and modified details of a list ite...
- Add attachment to a list in share point
- Hide content types of a list in share point progra...
- Delete content types in share point list (Remove t...
- Add Content type to a list in share point (Show co...
- Display permissions assigned to a list programmati...
- Display list views in sharepoint programmatically
- SharePoint - Delete and update list items programm...
- SharePoint - Adding list Items Programmatically
- Show list details in SharePoint
- asp page lifecycle
- Service Accounts in SharePoint 2010
- Microsoft Office SharePoint server(MOSS) 2007(Shar...
- SharePoint beginning tutorial and interview questi...
- SharePoint beginning tutorial and interview questi...
- Before Going to SharePoint
-
▼
February
(17)