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

In which situation can you not use a viewstate?

971


What are the new navigation controls in asp.net 2.0?

1011


Explain server control extensibility with reference to asp.net 2.0 ?

1006


Which is the parent class of the ASP.NET server control?

1070


Explain how can we inherit a static member?

995


What are the different kinds of assemblies?

948


What is loop in asp.net?

1107


What's the ASP.Net Application life cycle?

1118


What is content place holder?

975


What is the difference between equals() and == in c#?

1025


How much is the pay-for-use service if I chose not to use microsoft-sponsored advertising?

958


What is caching in asp.net?

1021


Explain the difference between page.registerclientscriptblock and page.registerstartupscript?

1036


What are tuples?

1150


Explain the significance of routing? : asp.net mvc

1062