SPWeb web = SPContext.Current.Web;
SPList oList = web.Lists["MyList"]; SPListItem oListItem = oList.Items; oListItem["Name"] = TextBox_Name.Text; oListItem.Update();
//my list wont get updated why?
I presume this is in a webpart if so try the following to see if it works :)
more info on AllowUnsafeUpdates:
also like others have noted that you need to check your list name is called "MyList" and its "Name" that you want to update ;)
hope it helps :)