6
Answers

How To Read Text Value From Dynamic Html Table

Hi Every One

I am creating dynamic html table in each row second column I am putting link button and in first column I am putting the label in the text property of the label I am setting the serial number my question when any user click the link button I have to read associate serial number of that row

For example if user click on the link button from the third row then I have to read the serial number of that row

Why I need this number because the text which I am displaying is same in all rows I have send this link button text and serial number associated to this row

Does any body have any idea regarding this issue please help me?

 

Thanks in advances

Answers (6)
0
Suthish Nair

Suthish Nair

NA 31.7k 4.6m 14y

Use Linq to datatable, refer sample.
DataTable dtMain = new DataTable();
DataTable dt1 = new DataTable();
//bind datatable
var rows1_10 = from item in dt1.AsEnumerable()
     select item;
var top1_10 = rows1_10.Take(10);
//do a for-loop and insert into dtMain
DataTable dt2 = new DataTable();
//bind datatable
var rows2_10 = from item in dt2.AsEnumerable()
     select item;
var top2_10 = rows2_10.Take(10);
//do a for-loop and insert into dtMain
0
Rajesh Kumar

Rajesh Kumar

NA 66 0 14y

Hi Purna,
Try to create  two temp datasets with a datatable containing 10 rows. and bind these two dataset to gridviews seperately.
Thanks
Rajesh