How to retrieve data row by row from a DataTable?
Thanks In advance
PriyaPP
Answers were Sorted based on User's Feedback
Answer / guest
foreach(Datarow dr in table.rows)
{
string str = dr[0].ToString();
string str1 = dr["columnName"].ToString();
}
Is This Answer Correct ? | 11 Yes | 3 No |
Answer / 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 |
Answer / digvijay
In C#
foreach(DataRow dr in dt.rows) //dt is Data table
{
string ABC= dr["Coloumn_Name"].Tostring;
}
Is This Answer Correct ? | 3 Yes | 2 No |
Features and disadvantages of dataset ?
4 Answers Interlink, Microsoft,
Mention the execution process for managed code?
Why is an object pool required?
hi ans dis qstn. "what is d max size of query string. If it exceeds does it give error. if yes wt error it gvs, if no gv the reason" thnx in advance
how we deploy the asp.net 2.0 application
what does Page.IsValid in asp.net
6 Answers Infosys, Net Solution,
What are Master Pages in ASP.NET?
What are type/key pairs in client script registration? Can there be 2 scripts with the same type/key pair name?
What’s the difference between asp.net web forms and asp.net mvc?
What is data caching?
What object is used to encapsulate a rowset? a) DataSet b) DataAdapter c) DataRowSet d) DataTable
Hi, I Dont know about Application and Session State management. Can anyone explain me with simple example?