Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

a)COM Callable Wrapper b)Runtime Callable Which one of the above is Win32 API in .Net?

2119


What is enableviewstate in asp net?

998


How many types of file extensions for razor views in ASP.Net MVC?

1334


What is the difference between table and query?

1018


What is application variable?

1003


How many web config files can be created for an application?

904


What is redirecting behavior?

1016


What is web api and why to use it?

1107


How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?

4274


What does aspcompat="true" mean?

1072


Which protocol is used in a web api?

1151


Which property is used to identify the Page is Post Back in ASP.NET?

1052


What is hidden field in asp.net?

1174


Explain what is the procedure to create the environment for asp.net? : asp.net mvc

1074


How you can add an event handler?

1012