We help IT Professionals succeed at work.

alternateitemtemplate in a repeater

ANAT2403
ANAT2403 asked
on
In ASP.NET 2.0 with C# in a repeater:
Is it possible to have an itemtemplate and then more then one alternateitemtemplate?
so that there  will be 4 differnt templates?
thankyou
Anat
Comment
Watch Question

Hi ANAT2403,

As far as I know there is no such out of the box functionality in ASP.NET but I know of a workaround you can use. Check this answer: http://forums.asp.net/p/880879/909959.aspx#909959

The idea is to define a number of templates in separate ASCX controls and then in ItemDataBound event handler to check which template should be used for a particular row and then to show the right template for that row.

I hope this will help you.

Cheers,
Sasa

Explore More ContentExplore courses, solutions, and other research materials related to this topic.