TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Amogh Natu
NA
700
324.6k
Repeater control's sort direction image not displaying
Mar 6 2014 8:33 AM
Hi,
I have implemented a repeater control which has some columns and data. For each column header, in the header template, I have defined a label for the header text and an <asp:Image /> tag for showing the direction of sorting (asc or desc). Sample code below:
<th class="HeaderCell">
<div class="HeaderCellPadding">
<asp:LinkButton ID="business_name" runat="server" CommandName="business_name"/>
<asp:Image ID="img_business_name" runat="server" />
</div>
</th>
..... and so on similarly for other header columnsInitially, these images are not shown (I'm setting their Visible property to false in ItemDataBound). But when any of the column headers are clicked, this image should show the corresponding direction of sort.
Just like any other sort direction display....
Initially, in my code, I wrote the visibility toggling of these images in the ItemCommand event handler based on the command name sent. But no matter how hard I tried, these images were not showing up on the click of those headers.
However, after I put this toggling logic in the ItemDataBound event handler, the images started showing up as expected.
Can someone please explain how this makes any difference?
Thanks.
Reply
Answers (
0
)
Images Caching in ASP.NET
Template ASP.NET