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
Carmen
NA
11
0
Retrieving Data values from ListView
Jul 27 2009 4:52 PM
This is my ListView
<
asp
:
ListView
ID
="ListView1"
runat
="server"
>
<
LayoutTemplate
>
<
table
runat
="server"
id
="itemTable">
<
tr
>
<
th
></
th
>
<
th
>
Name 1
</
th
>
<
th
>
Name 2
</
th
>
<
th
>
Name 3
</
th
>
<
th
>
Name 4
</
th
>
<
th
>
Name 5
</
th
>
</
tr
>
<
tr
runat
="server"
id
="itemPlaceholder"
></
tr
>
</
table
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
tr
>
<
td
><
asp
:
CheckBox
ID
="CheckBox1"
runat
="server"
/></
td
>
<
td
>
<%
#
DataBinder
.Eval(Container.DataItem,
"name1"
) %>
</
td
>
<
td
>
<%
#
DataBinder
.Eval(Container.DataItem,
"name2"
) %>
</
td
>
<
td
>
<%
#
DataBinder
.Eval(Container.DataItem,
"name3"
) %>
</
td
>
<
td
>
<%
#
DataBinder
.Eval(Container.DataItem,
"name4"
) %>
</
td
>
<
td
>
<%
#
DataBinder
.Eval(Container.DataItem,
"name5"
) %>
</
td
>
</
tr
>
</
ItemTemplate
>
</
asp
:
ListView
>
This is My code
protected
void
Button1_Click(
object
sender,
EventArgs
e)
{
for
(
int
i = 0; i < ListView1.Items.Count; i++)
{
CheckBox
chk = ListView1.Items[i].FindControl(
"CheckBox1"
)
as
CheckBox
;
if
(chk.Checked ==
true
)
{
** Here I want to be able to get the value of
<
td
>
<%
#
DataBinder
.Eval(Container.DataItem,
"name1"
) %>
</
td
>
From my ListView ItemTemplate**
}
}
}
Reply
Answers (
1
)
The AJAX isn't working when I request site via the DomenName
Windows Services