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
a)COM Callable Wrapper b)Runtime Callable Which one of the above is Win32 API in .Net?
What is enableviewstate in asp net?
How many types of file extensions for razor views in ASP.Net MVC?
What is the difference between table and query?
What is application variable?
How many web config files can be created for an application?
What is redirecting behavior?
What is web api and why to use it?
How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?
What does aspcompat="true" mean?
Which protocol is used in a web api?
Which property is used to identify the Page is Post Back in ASP.NET?
What is hidden field in asp.net?
Explain what is the procedure to create the environment for asp.net? : asp.net mvc
How you can add an event handler?