ComponentOne ListView for ASP.NET Web Forms
Task-Based Help / Creating and Loading an XML Template / Creating an XML Template
In This Topic
    Creating an XML Template
    In This Topic

    To create an XML template, complete the following steps:

    1. Create a C1ListView control. You can use a previously created control, or you can create a new control with the formatting you desire. Here's some markup to create a C1ListView control:
      <cc1:C1ListView ID="C1ListView1" runat="server">
      <Items>
      <cc1:C1ListViewLinkItem Text="The Godfather"></cc1:C1ListViewLinkItem>
      <cc1:C1ListViewLinkItem Text="The Good, the Bad and the Ugly"></cc1:C1ListViewLinkItem>
      <cc1:C1ListViewLinkItem Text="12 Angry Men"></cc1:C1ListViewLinkItem>
      <cc1:C1ListViewLinkItem Text="One Flew Over the Cuckoo's Nest"></cc1:C1ListViewLinkItem>
      <cc1:C1ListViewLinkItem Text="Star Wars: Episode V - The Empire Strikes Back"></cc1:C1ListViewLinkItem>
      <cc1:C1ListViewLinkItem Text="The Dark Knight"></cc1:C1ListViewLinkItem>
      </Items>
      </cc1:C1ListView>
    2. Switch to Design View and open the Designer Form by clicking the control's smart tag and selecting Edit ListView from the C1ListView Tasks menu.
    3. In the Designer Form, select File | Save as XML.
    4. When the Save As window opens, browse to the location where you want to save your XML file. Enter a name for your XML file and click Save.

     In this topic, you created and saved a C1ListView control as an XML file.

    See Also