How to merge 2 tables fields in DataTable in asp.net
Answer Posted / sunil kumar
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
col1 col2 col3 col4
1 2 3 4
Is This Answer Correct ? | 21 Yes | 15 No |
Post New Answer View All Answers
Why we use asp.net for website development?
Describe Segmentation With Paging?
Differentiate between a page theme and a global theme?
What are the different types of validation controls in asp.net?
What are the differnt types of handler in ASP.NET?
Where the cookie value is stored?
What is mvc in asp.net tutorial? : Asp.Net MVC
What is a web pool?
How to rename a table using sql queries?
What are the different methods of session maintenance in asp.net?
What is meant by ispostback in asp net?
What is asynchronous call?
What are the memory-mapped files?
What is the difference between a candidate key and primary key?
What is syntax code to send email from an asp.net application?