views:

103

answers:

2

Hello, I have a UserControl named BreadCrumb. I would like to pass in information to this user control like so (Similar to DropDownList items):

<uc:BreadCrumb runat="server" id="HeaderBreadCrumb">
    <AddLevel Name="Home" Url="~/Default.aspx" />
    <AddLevel Name="About Us" Url="~/AboutUs.aspx" />
</uc:BreadCrumb>

Thanks to any help!

A: 

You can support templates, but that's not exactly what you are after.

Take a look at this Scott Guthrie page for more information on using templates on user controls.

Also, take a look at this MSDN page on how to create templated user controls.

Gabriel McAdams
+3  A: 

Please take a look here How to: Create an ASP.NET User Control and here Implementing Custom UserControl with ListItem collection. These approaches doesn't uses templates.

Rubens Farias