i have 2 xml files. i want to display the common record in this 2 files
i want to display in agridview;
the following code displays record in a literal.
i want to display the result in a grid .
any possibility
K L BAIJU
XDocument xmldocemp = XDocument.Load(Server.MapPath("Employee.xml"));
XDocument xmldocdept = XDocument.Load(Server.MapPath("Dept.xml"));
var emps = from emp in xmldocemp.Descendants("Employee")
select emp;
var depts = from dept in xmldocdept.Descendants("Department")
select dept;
foreach (var xnodemp in emps)
{
foreach (var xnoddept in depts)
{
if (xnodemp.Element("Id").Value == xnoddept.Element("Id").Value)
{
Literal1.Text = Literal1.Text + "Name : " + xnoddept.Element("Name").Value + "<br/>";
Literal1.Text = Literal1.Text + "Dept : " + xnoddept.Element("Dept").Value + "<br/>";
}
}
}