Does any one have idea about how to select a specific row of datatable in asp.net 2.0 using C#?
How to select a datatable row at runtime in asp.net 2.0 using C#?
Hi,
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dipankar SanaPosted May 26, 2010, 7:14 AM
DataTable Dt = new DataTable();
Dt.Rows[2].Delete();
Balamuruan BPosted May 26, 2010, 10:03 AM
In DataTable class , we have one Select function ,by using that function you can fetch the list of rows from datatable object.It is available in 3 types..see it in object browser
General syntax:
DataTable dt ;
dt = New DataTable()
DataRow dr[] = dt.Select("[TableId]=" + UrSearchKey)
ex:
dr=dt.Select("[StudentId]=" + "101")