How to create web part to insert data in custom list
I'm quite new to sharepoint and what I want to develop is this:
I have a number of custom lists that are connetted between them like a relational DB. What I want to do is to develop a web part that will be开发者_如何学Go able to insert data in all these different lists.
Can someone please give me some hints to where to start from? If there are some tutorials or how tos. Thanks a lot.
AB
There is a nice article about adding items to custom sharepoint list you can check it !
Goes like
SPSite mySite = SPContext.Current.Site;
SPWeb myWeb = SPContext.Current.Web;
SPList myList = myWeb.Lists["Custom List"];
SPListItem myListItem = myList.Items.Add();
myListItem["Title"] = oTextTitle.Text.ToString();
myListItem["Employee Name"] = oTextName.Text.ToString();
myListItem["Designation"] = oTextDesignation.Text.ToString();
精彩评论