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

Where web.config file is used?

1079


What is form submit?

949


What is dynamic web page with example?

946


Difference between .NET and previous version?

2575


How to turn off cookies for a page?

986


Please briefly explain the usage of global.asax?

950


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

1125


Who creates jsessionid?

1023


What is server side session management?

923


What language does asp.net use?

988


Web API supports which protocol?

1371


How many types of session in ASP.NET

1073


How can we inherit a static variable?

1047


How to make paging concepts in datagrid in ASP.NET?

1021


Explain difference between dataset and datareader?

1035