I have created a list of links through Visual Studio. Now I want to add items to that list. How can I do it through visual studio itself?

I am using visual studio 2013.

  • Can you put some sample code about what you are doing, so we can help you more.
    – Milind
    Dec 20, 2013 at 16:59

1 Answer 1


If you add list using ListInstance then you can add items using ListInstance file:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="LinkList" OnQuickLaunch="TRUE" TemplateType="170" FeatureId="Your feature id" Url="Lists/LinkList" Description="Your description">
          <Field Name="Title">About</Field>
          <Field Name="Description">Description</Field>
          <Field Name="LinkLocation">http://testlink.com</Field>
          <Field Name="BackgroundImageLocation">
          <Field Name="LaunchBehavior">New tab</Field>
          <Field Name="Order">2</Field>
  • Is this to be write inside Elements.xml inside ListInstance file? I tried, but getting this error: The element 'Elements' in namespace 'schemas.microsoft.com/sharepoint' has invalid child element 'Data' in namespace 'schemas.microsoft.com/sharepoint'. Dec 23, 2013 at 4:27
  • Yes in Elemets.xml of ListInstance file. You can make sure that ListInstance element have child element Data msdn.microsoft.com/en-us/library/office/… Dec 23, 2013 at 8:09
  • The problem was that I created lists as type links. For that data element was not available. Now I created with list. Any way we can make list items as hyperlink. Dec 23, 2013 at 9:18
  • How can I add the Images in the Picture Library with the VS2012?
    – Ram
    Oct 21, 2016 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.