C # Design Template Containers?

I am trying to find a good guide for creating a templated control. I'm trying to display multiple photos on several different parts of my site, so I wanted to add a template control to allow me to modify the HTML before rendering it. Something like:

<cc1:photos runat="server" id="myPhotos">
<photoCell>
    <img src="<%# photo %>" alt="<%# alt %>" /><br /><%# photoText %>
</photoCell>
</cc1:photos>

      

Then I want to be able to print this photo several times depending on the number of photos I want to display. The problem is that I cannot find any tutorials on this topic that also show how to print data multiple times with different texts / images.

+2


source to share


1 answer


Take a look at this to create a templated control:

http://msdn.microsoft.com/en-us/library/ms178657.aspx



Also have you considered using a repeater?

+2


source







All Articles