Related Tags:
Asp.Net It was developed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. Learn More, C# C# (pronounced "C-sharp") is an object-oriented programming language from Microsoft that aims to combine the computing power of C++ with the programming ease of Visual Basic. C# is based on C++ and contains features similar to those of Java. Learn More, ASP.NET Web Forms ASP.NET Web Forms is a web application framework and one of several programming models supported by the Microsoft ASP.NET technology. Web Forms applications can be written in any programming language which supports the Common Language Runtime, such as C# or Visual Basic. Learn More,

how to apply different Style on last item of a asp.net repeater ?

Description:Is it possible to detect the last item of the asp.net repeater inside the ItemTemplate ?

Posted by: | Posted on: Aug 30, 2017

1 answers

Replies

1

You can directly apply the following code inside your repeater by converting the data source of your repeater to IList and following code will apply class "Last" at last item. you can apply your styling accordingly.

 
<%#Container.ItemIndex==(RepeaterName.DataSource as IList).Count-1?"Last":"" %>

Replied by: | Replied on: Sep 07, 2017



Reply
×

Code block Hyperlink bold Quotes block Upload Images

Preview