I have created a standard SharePoint Links list, using Managed Client Object Model (for Silverlight). Here's the code:
ClientContext clientContext = new ClientContext(sitePath);
clientContext.Load(clientContext.Web);
clientContext.ExecuteQueryAsync(OnSucceeded, OnFailed);
ListCreationInformation lci = new ListCreationInformation();
lci.Title = "My Links";
lci.Description = string.Empty;
lci.TemplateType = ListTemplateType.Links;
List list = clientContext.Web.Lists.Add(lci);
clientContext.ExecuteQueryAsync(OnSucceeded, OnFailed);
I want to be able to add items to this list programmatically, but I am stuck. Normally, I'd add a new list item in the following manner:
ListItemCreationInformation lici = new ListItemCreationInformation();
ListItem item = list.AddItem(lici);
item.ParseAndSetFieldValue("Some field name", "Some field value");
item.ParseAndSetFieldValue("Some other field name", "Some other field value");
item.Update();
clientContext.ExecuteQueryAsync(OnSucceeded, OnFailed);
The problem is that I don't know which field I should target for the link's URL and Title fields. Help please. Thank you.