How to get the row index on checking a Checkbox in a ListView



How to get the row index on checking a Checkbox in a ListView..

Answer / kumarsunny9

on ListView_itemDataBound event

Label lblsno = (Label)e.item.Cells[1].FindControl
("lblsno");
int count = grdorderdetail.Rows.Count;
for (int i = 0; i <= count; i++)
{
lblsno.Text = (i + 1).ToString();
}

Is This Answer Correct ?    11 Yes 2 No

Post New Answer

More ASP.NET Code Interview Questions

how to track links visited in google using iframes

0 Answers  


How to get the row index on checking a Checkbox in a ListView

1 Answers   TCS,


how to upload an excel in c# ASP.Net?

3 Answers  


HOw to Build a Nested GridView Control with ASP.NET?

2 Answers  


Data Reader Vs DataSet

5 Answers   TCS,


How to get Dynamically Linked Comboboxes Set?

0 Answers   HCL,


How to Bind Nested XML to a Repeater Control with Container.DataItem?

0 Answers  


Code for Presenting Parent/Child Data in a Data Grid Row?

0 Answers   TCS,


Code for Using Keyboard Events?

0 Answers  


how can we close a web page in asp.net without using jscript?

4 Answers  


Code for a Simple Way to Write XML in .NET (XmlTextWriter)

1 Answers  


hold checkbox values

4 Answers  


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)