How to merge 2 tables fields in DataTable in asp.net
Answer Posted / abc
DataTable dt1 = retDT("select col1,col2 from Table1");
DataTable dt2 = retDT("select col3,col4 from Table2");
dt1.Merge(dt2);
retDT is a funtion to return datatable based on the query.
The output will be like below
if you check the dt1 content then the output will be
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is view state management in asp net?
How to disable cut, copy and paste in TextBox using jQuery in asp.net?
What is autopostback in dropdownlist in asp net?
What r the asp.net list controls and diff. Between them?
How to use push notification?
How to disable disable browser's Back button in asp.net (JavaScript)?
Is asp.net mvc front end or backend? : Asp.Net MVC
What is the use of placeholder control?
What is the size of Get method and how much data it can store?
Whats the difference between abstract factory pattern and factory pattern?
Why is mvc better than asp.net?
What does aspcompat="true" mean?
What is recordset asp?
What is difference Between Authentication and authorization?
Explain what the contents of cookie?