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 Bind Nested XML to a Repeater Control with Container.DataItem?

0 Answers  


How we use ajax in asp.net through javaScript. Please givee me an example.

0 Answers  


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  


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

2 Answers  






Coding for Synchronizing Cache Access in ASP.NET?

0 Answers  


i have a gird with columns all are coming from database,this will bind in item templete in gridview as textboxex.and i have button below named Update.i want to update all the records in the grid,but if user change the value of one textbox,what is the easy way 2 do this

0 Answers   Crompton Greaves,


how the value of label is printed through a button in asp.net web application

3 Answers  


How to integrate the regional language in asp.net and c# like Telugu, Hindi etc,. send a sample program

3 Answers   Concept, NIIT, Wipro,


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

0 Answers  


How to Export Data to Excel?

4 Answers   Eastcom Systems,


Data Reader Vs DataSet

5 Answers   TCS,


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)