Добавить элемент списка через Visual Studio
-
10-12-2019 - |
Вопрос
Я создал список ссылок через Visual Studio.Теперь я хочу добавить элементы в этот список.Как я могу сделать это через саму визуальную студию?
Я использую Visual Studio 2013.
Решение
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">
<Data>
<Rows>
<Row>
<Field Name="Title">About</Field>
<Field Name="Description">Description</Field>
<Field Name="LinkLocation">http://testlink.com</Field>
<Field Name="BackgroundImageLocation">
/sites/Images/tile_about.png</Field>
<Field Name="LaunchBehavior">New tab</Field>
<Field Name="Order">2</Field>
</Row>
</Rows>
</Data>
</ListInstance>
</Elements>
Не связан с sharepoint.stackexchange