Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SharePoint > SharePoint Development
|
SharePoint Development Programming and development for SharePoint Portal Server and Windows SharePoint Services
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SharePoint Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2010, 05:06 AM
Registered User
 
Join Date: May 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to perform insert ,delete,update, display data in a sharepoint list from infopath

hi iam having sharepoint point list customers
from infopath i want to store data, display , delete,update

how to do can you give example which helps me
 
Old June 23rd, 2010, 05:27 AM
Authorized User
 
Join Date: Jan 2010
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to elizas
Default Add, Update and Delete List Items Programmatically in Sharepoint

Using Microsoft Sharepoint APIs we can easily Add, Update and Delete list items programmatically. Provided below is a code snippet in C# .Net demonstrating all the three operations.

using (SPSite oSPsite = new SPSite("http://website url/"))
{
using (SPWeb oSPWeb = oSPsite.OpenWeb())
{
oSPWeb.AllowUnsafeUpdates = true;

// Fetch the List
SPList list = oSPWeb.Lists["MyList"];

//Add a new item in the List
SPListItem itemToAdd = list.Items.Add();
itemToAdd["Title"] = "Test Title";
itemToAdd["Description"] = "Test Description";
itemToAdd.Update();

Thanks,
Eliza
Learn about SharePoint Migration.
__________________
Cheers,
Eliza

Mindfire: India's Only Company to be both Apple Premier & Microsoft Gold certified.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharepoint list edit and delete column yugi9966 SharePoint Development 0 December 14th, 2009 03:30 AM
INSERT, UPDATE, DELETE dagad ASP.NET 2.0 Professional 0 September 27th, 2006 01:22 AM
Filtered Sharepoint list, not filtered in infopath wmrdude SharePoint Development 0 July 26th, 2006 05:09 AM
Views-Insert/update/delete lily611 SQL Language 2 November 29th, 2004 03:41 AM
Update, insert and delete Trigger khautinh SQL Server 2000 2 September 17th, 2003 11:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.