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 we use ajax in asp.net through javaScript. Please givee me an example.

0 Answers  


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

1 Answers  


Code for Communicating over Sockets?

0 Answers  


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

3 Answers  


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

4 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 to use Client-side Script to Focus Controls in ASP.NET?

0 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,


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

3 Answers  


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

2 Answers  


Code for Document Validation in XML.NET?

0 Answers   TCS,


How to Create Scrollable Micro Windows?

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