This code takes txt box texts and saves them into SP list. It creates a new list item thurhg "AddANewSPListItem" method, this is custom method but sharpoint services offer built in methods, if an item allready exists then you need to fetch the item and the rest is the same as below. You just need to change the method from create to get.
I dont know however if this is the best way but it works form me :P
SPListItem spItem = AddANewSPListItem("ListName");
spItem["FieldName"] = textBox1.Text.Trim();
spItem["FieldName2"] = textBox1.Text.Trim();
using (SPSite site = new SPSite(URLOfYourSharepointSite))
{
site.WebApplication.FormDigestSettings.Enabled = false;
site.AllowUnsafeUpdates = true;
using (SPWeb currWeb = site.OpenWeb())
{
currWeb.AllowUnsafeUpdates = true;
spItem.Update();
currWeb.AllowUnsafeUpdates = false;
site.AllowUnsafeUpdates = false;
site.WebApplication.FormDigestSettings.Enabled = true;
}
}
Good luck!
B