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

What’s difference between “optimistic” and “pessimistic” locking?

1078


What is the difference between rest and restful?

1061


When cookie will expire?

1001


Which is better session or viewstate?

955


What is the file extension of web service?

1000


Explain the reason why the javascript validation not run on the asp.net button but run successfully on the html button?

1041


What is the difference between system.stringbuilder and system.string

790


Can master pages be nested?

936


What is the question mark in a url?

963


Disable Mouse right click on web page in asp.net?

1054


What is mvc in angular?

986


Explain Features in ASP.NET

1098


What is a web api?

1065


Distinguish between Server-side and Client-side code?

1101


Explain file-based dependency and key-based dependency.

990