Using below code you can get Repeater's Row/Item Count:
in below code "Container.ItemIndex" is used to get current row number and
"(string[])rpttags.DataSource).Length" is used to get total row/item count.
in above line my datasource for repeater was a string array so i used string[] as datasourcetype and used length to get its count in same way you can get for all other types
eg:-
<%# (Container.ItemIndex < ((yourDataSourceDataType)rpttags.DataSource).Length - 1?",":"") %>
3 comments:
Hi Rajesh.
I realize this is way after your post, but it looks like you're putting a comma between your items.
If that is all, you can just use
<SeparatorTemplate>, </SeparatorTemplate>
Your solution works and has potential benefits for other use cases, but the case you use it for has a simpler solution.
nice post
Quality content is thee secret to bee a focus for the people to visit thee web site, that's
what thjis website iss providing.
Post a Comment