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

Explain asp.net application life cycle?

975


how to elimainte the similar data from the different tables

2164


How can you dynamically add user controls to a page?

957


What is inproc mode in session?

936


Explain automatic memory management in .net.

1017


Explain the use of resource manager class in .net.

974


explain code with datachaching with example

2142


What is difference between session and cookie?

998


In ViewState How much lifespan items stored?

1070


What is Forms Authentication in ASP.NET?

1077


Explain the difference between singleton and single call?

979


Is redux flux?

947


What is css in asp.net?

1064


What is asp.net version?

979


How can we communicate with each server in N-tier Architecture? and what are the methods?

2229