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

What events will occur when a page is loaded?

1098


What is applicatio domain?

1061


Is post back in asp.net?

1004


Explain the use of errorprovider control in .net?

1010


Define web services in asp.net.

1126


How can you implement encapsulation in asp.net?

13252


What is autopostback true?

1122


What are the different types of sessions in asp.net? Name them?

1229


What is the difference between session and application?

1013


Distinguish between Server-side and Client-side code?

1157


List all templates of the repeater control.

1153


What is viewstate information stored?

1139


What is the difference between mvc and asp.net? : Asp.Net MVC

1069


What is the difference between asp.net and mvc?

1168


What is the difference between login controls and forms authentication?

1134