I have four datatables
datatable1
DataView view = dt1.DefaultView;
view.Sort = "Wfname ASC";
DT1NEW= view.ToTable();
datatable2
DataView view = dt2.DefaultView;
view.Sort = "Bfname ASC";
DT2NEW = view.ToTable();
datatable3
DataView view = dt3.DefaultView;
view.Sort = "Tfname ASC";
DT3NEW = view.ToTable();
datatable4
DataView view = dt4.DefaultView;
view.Sort = "Dname ASC";
DT4NEW = view.ToTable();
now based on the drop down selection i need to check whether all the datatables have same no of rows or same data or not without checking the extensions
if(ddlstype.SelectedValue == "1")
{
i need to check DT1NEW,DT2NEW and DT3NEW have same no of rows and same names or not
}
if(ddlstype.SelectedValue == "2")
{
i need to check DT1NEW and DT2NEW have same no of rows and same names or not
}
if(ddlstype.SelectedValue == "3")
{
i need to check DT1NEW,DT3NEW and DT4NEW have same no of rows and same names or not
}
that means if my DT1NEW has
Wfname
501.wav
502.wav
503.wav
and DT2NEW has
Bfname
501.doc
600.doc
604.doc
610.docx
and my DT3NEW has
501.docx
700.doc
it should show an error message that please upload equal number of files
in the next case if my dts are in this way
Wfname
501.wav
502.wav
and DT2NEW has
Bfname
501.doc
600.doc
and my DT3NEW has
501.doc
700.doc
then 501 record should be inserted into database and for the second row it should show that
502 does not match with 600 and 700
how can i do this
What I have tried:
i am new to this so can anyone help me out