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

hold checkbox values

4 Answers  


Give coding for Exception Handling Techniques in ASP.NET?

3 Answers   Microsoft,


How to add checkbox to datagrid?

5 Answers  


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

0 Answers   TCS,


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

1 Answers   TCS,






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

4 Answers  


How to Export Data to Excel?

4 Answers   Eastcom Systems,


how to upload a photo? i need to use it in a matrimonial applicaton...

1 Answers  


What is the code of Password Recovery or Forget your password? Plz tell in c # language.

0 Answers  


working with fileUpload ?

1 Answers  


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

1 Answers  


What do you create for easier access of data?

3 Answers   NIIT,


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)