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 an asp.net validator? And, mention its types.
What are the best practices to follow to secure connection strings in an ASP.NET web application?
Explain how viewstate is being formed?
List some of the important session state modes of asp.net.
Which dll handles the request of .aspx page?
Explain the use of errorprovider control in .net?
What is asp net_sessionid?
What language does asp.net use?
1.What r collections? 2.What is .pdb file? 3.Is it possible to provide access to users in master page? 4.What is dirty n Phantom Read(SQL)? 5.What r different isolation levels(SQL)? 6.How to set authentication mode in web.config file?
Where the cookie value is stored?
What is virtual directory in asp.net?
How is application management and maintenance improved in asp.net 2.0?
Explain the main differences between asp and asp.net?
Is there any alternative to avoid name collisions other then Namespaces?
What is an assembly? Explain its parts.