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 the purpose of master page?
Which data type does the rangevalidator control support?
How may clustered index we can create in table?
Can we have multiple master pages in asp net?
What are server activated objects?
What does clearing cache?
What is round trip in asp.net?
What are the components of ado.net?
What language is asp.net written in?
What is manifest in .net framework?
Tell me the code snippet to show how we can return 404 errors from HttpError?
Define page fragment caching?
in which protocol ASP.NET WEB API Work?
How asynchronous call can be implemented using delegates?
Describe Segmentation With Paging?