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 / 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


Please Help Members By Posting Answers For Below Questions

Which protocol is used to call web service?

967


How you will improve web application performance?

1006


What is the most appropriate lifetime for a database connection/orm context in an asp.net mvc application? : Asp.Net MVC

983


Give an example of cookie abuse.

1039


What is the use of session in web application?

928


What is asp.net localization?

952


Can I read the hard disk serial # of the client computer using asp.net?

1035


Tell me the code snippet to show how we can return 404 errors from HttpError?

1237


How to do parallel database export in remote SQL Server in ESSL time track. It is working for local server but not working for remote SQL Server

6571


What is runat?

1028


What are httphandlers and httpmodules and difference between them?

972


Is post back in asp.net?

932


what are configuration files?

1004


What is the difference between client-side and server-side validations in ASP.NET?

1134


What is AutoPostback?

1124