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
piya p
NA
84
47.9k
How to increment item.ItemIndex by 1
Apr 16 2014 6:23 AM
n my application. I am adding datalist and and there is image button inside it.
when user click on any image button he should redirect to next page acccording to selected index.
I am using following code on button click event to get index of that button
ImageButton imgbtn = (ImageButton)sender;
DataListItem item = (DataListItem)imgbtn.NamingContainer;
// ImageButton tb = (ImageButton)item.FindControl("ImageButton1");
//DataListItem item = (DataListItem)imgbtn.Parent;
int index = item.ItemIndex;
but by using it index is incrementing by multiple of 2.
e.g
for 1st image it is 0,
for 2nd image it is 2,
for 3rdimage it is 4 and so on..
How to incement it by 1 ?
Reply
Answers (
1
)
Auto generate columns in Repeater for Web controls
How to implement Bielefeld Academic Search engine in my webs