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 |
what is postback implementation?when pre-render event n init event is fired?
In cache where dats is stored and how(file or object?)
What is the use of session in web application?
What is a response cookie?
How many web.config files can I have in an application?
Differentiate between a hyperlink control and a linkbutton control.
and can u telme how to explain about our job profile if i have 3years of it experiance in dotnet domain and where to start and where to end , and what shoul i tel and what not(can i mention my education ,and family details,......)i am confusiong a lot. can i ask one with your permision, if u have question that u u went tcs interview as 3+years exp so he/she asked tel me about your profile how can u tel and where to stop. please help me as simple as possible i am facing lot in this..............plese can anyone help me i am awaiting for your reply.
How can we prevent browser from caching an aspx page?
For a server control, you need to have same properties like color maxlength, size, and allowed character throughout the application. How do you handle this?
Give an example appropriate use forweb service as opposed to a non-serviced .NET component
What is redirecting behavior?
Where is the session stored?