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 the difference between page-level caching and fragment caching?

619


What is server components?

639


How can we prevent browser from caching an aspx page?

608


How to use push notification?

695


Explain the concept of View Model in MVC?

679






Is asp net front end or backend?

622


Can more than one person use the same login?

661


What is the difference between localization and globalization?

663


Can we set master page as a start page?

649


What is cas?

687


Why does my asp.net file have multiple tag with runat=server?

655


What role “#&&” plays in a querysting?

642


What are the server controls in asp.net?

548


Why viewstate is used in asp.net?

620


how to retrieve property settings from xml .config file.

633