How to programmatically read, add and edit item in a SharePoint list
Written By: Ivan Ivanov -- 8/30/2011 --
(1) comments --
Categories: Design, Programming and Customizations, SharePoint 2010, Visual Studio, Web Parts
< Prev -
- Next >
| Become a paid author
I have a company that supports an Internet portal on SharePoint, called HotSpotPlace. The portal provides information, advertisements, services and so
on. The company has a merchant partner - a company selling consumer goods online. The partner wants clients to be able to make orders
for products on any portal page, because the portal is very popular. Users need to be able to register
online and for each product, a history of the last purchase date has to be preserved for analytical purposes. These are the requirements.
To fulfill requirements we are going to:
- Create a list of provided products.
- Create a list of orders.
- Develop a web part.
The web part will appear on each page of the portal. The web part has to have the following functionalities:
- Read the products from the product list.
- Add new order.
- Update the date, so last purchase date will be preserved.
Let's start with lists. Firstly we create a Product list. The list contains product title and last purchase date.
The next step is to create an orders list which contains product title, quantity,
and delivery address.
Now we are ready to start with the web part.
In order to make the web part we will use Visual Studio 2008.
On the Navigation Pane from the "File" menu, select "New Project". We will name this project
Under "Project Types", select SharePoint, and under "Visual Studio installed Templates" select "WebPart Template".
Type the project name and press OK.
< Prev -
- Next >