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


Please Help Members By Posting Answers For Below Questions

What is inproc and outproc?

531


Can we use MSSql as backend in asp.net...if yes then How.?

595


What is Forms Authentication in ASP.NET?

589


What is skin in asp.net?

526


in which protocol ASP.NET WEB API Work?

625






Why do you use the app_code folder in asp.net?

560


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?

557


To get the values in two different controls to match which control you use it?

546


Where would you use an ihttpmodule, and what are the limitations if any?

540


How to store checkbox value in database in asp.net mvc? : Asp.Net MVC

526


What are sessions in asp net?

531


What is repository pattern in mvc.net? : asp.net mvc

540


Which property is used to identify the Page is Post Back in ASP.NET?

566


What are the advantages of using session?

446


What is the difference between Classic ASP and ASP.Net?

544