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 is view state management in asp net?

875


How to disable cut, copy and paste in TextBox using jQuery in asp.net?

1153


What is autopostback in dropdownlist in asp net?

955


What r the asp.net list controls and diff. Between them?

938


How to use push notification?

1001


How to disable disable browser's Back button in asp.net (JavaScript)?

1082


Is asp.net mvc front end or backend? : Asp.Net MVC

898


What is the use of placeholder control?

974


What is the size of Get method and how much data it can store?

1089


Whats the difference between abstract factory pattern and factory pattern?

992


Why is mvc better than asp.net?

1021


What does aspcompat="true" mean?

991


What is recordset asp?

962


What is difference Between Authentication and authorization?

1090


Explain what the contents of cookie?

1019