alternateitemtemplate in a repeater

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
ANAT2403Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sasapopovicConnect With a Mentor Commented:
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
0
All Courses

From novice to tech pro — start learning today.