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 events will occur when a page is loaded?
What is applicatio domain?
Is post back in asp.net?
Explain the use of errorprovider control in .net?
Define web services in asp.net.
How can you implement encapsulation in asp.net?
What is autopostback true?
What are the different types of sessions in asp.net? Name them?
What is the difference between session and application?
Distinguish between Server-side and Client-side code?
List all templates of the repeater control.
What is viewstate information stored?
What is the difference between mvc and asp.net? : Asp.Net MVC
What is the difference between asp.net and mvc?
What is the difference between login controls and forms authentication?