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
In which situation can you not use a viewstate?
What are the new navigation controls in asp.net 2.0?
Explain server control extensibility with reference to asp.net 2.0 ?
Which is the parent class of the ASP.NET server control?
Explain how can we inherit a static member?
What are the different kinds of assemblies?
What is loop in asp.net?
What's the ASP.Net Application life cycle?
What is content place holder?
What is the difference between equals() and == in c#?
How much is the pay-for-use service if I chose not to use microsoft-sponsored advertising?
What is caching in asp.net?
Explain the difference between page.registerclientscriptblock and page.registerstartupscript?
What are tuples?
Explain the significance of routing? : asp.net mvc