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 convert Dataset to Object Array or list in c# .net

4 Answers  


ArrayList declaration in .net

0 Answers  


hold checkbox values

4 Answers  


Common UI for Multiple web applications. Suppose there are 35 websites using same third party controls.These 3rd party controls are made together that all 35 websites can use these controls.If we put all 3rd party controls and use its dll in 35 websites,only class files will be accessable. But I want to use CSS,images also in all 35 websites. how I can design the N-tier solution for this project.

0 Answers   TCS,


where is assembly are store

5 Answers   C DAC,






Listview design in .net

1 Answers  


How to Export Data to Excel?

4 Answers   Eastcom Systems,


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

0 Answers  


Give coding for Exception Handling Techniques in ASP.NET?

3 Answers   Microsoft,


what is software testing

1 Answers   TCS,


how to create a search bar which access data from various websites and retrieves the data

0 Answers  


Give coding for Implementing a Fixed GridView Header in ASP.NET?

1 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)