How to retrieve data row by row from a DataTable?
Thanks In advance
PriyaPP
Answer Posted / suyash deep
best way to retrieve data is-
//dtTable is Data table
//dtrow id Data Row object
string str;
foreach(DataRow dtrow in dtTable.rows)
{
str= dtrow ["emp_Name"].Tostring();
//emp_Name is the column name
// now use str variable as you want to manipulate.
}
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is inproc and outproc?
Can we use MSSql as backend in asp.net...if yes then How.?
What is Forms Authentication in ASP.NET?
What is skin in asp.net?
in which protocol ASP.NET WEB API Work?
Why do you use the app_code folder in asp.net?
Can we have multiple worker process in an ASP.NET application? If so then how it has been handled by application? And who handles it?
To get the values in two different controls to match which control you use it?
Where would you use an ihttpmodule, and what are the limitations if any?
How to store checkbox value in database in asp.net mvc? : Asp.Net MVC
What are sessions in asp net?
What is repository pattern in mvc.net? : asp.net mvc
Which property is used to identify the Page is Post Back in ASP.NET?
What are the advantages of using session?
What is the difference between Classic ASP and ASP.Net?