objects within webcontrol tag RRS feed

  • Question

  • User1812098621 posted

    I want to put an object inside webcontrol markup like this:

    <wc:MyControl ID="ctrl" runat="server">

         <Person id="1">

            <Name> 1 </Name>

            <Address> </Address>


         <Person id="2">

            <Name> 2 </Name>

            <Address> </Address>



    Person would be an object (XmlSerializable?) and MyControl could have a List of the type. How can I do this?

    Friday, March 14, 2008 7:28 AM


  • User-16411453 posted

    In theory via words

     You have to make a collection list class.  the Person would be the collection Name, and Name and address would be property types.

    Then add to the collection via code Collection.Add with you xml stuff.

    It's the same thing as the menu control I've been working on.  Look for my post I just posted by jkirkerx

     Similar project link to get the idea





    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 16, 2008 3:46 PM