XElement xml = new XElement("contacts",
from c in db.Categories
orderby c.CategoryID
select new XElement("contact",
new XAttribute("contactId", c.CategoryID),
new XElement("firstName", c.CategoryName),
new XElement("lastName", c.Description))
);
// Saving to a file, you can also save to streams
xml.Save(@"C:\contacts.xml");
<dxm:ASPxMenu ID="ASPxMenu1" runat="server">
</dxm:ASPxMenu>
Using the above syntax i can save table value in XML format.But i can not bind this value to *AspxMenu*bellow syntax show error.
ASPxMenu1.DataSource = xml;
ASPxMenu1.DataBind();
I try to save datavalue in xml format in specific location ,Then want to bind AspxMenu with this file value value.
After run the code C drive contain file named contacts.xml . I want to bind menu by this file.*Help me to bind.*HOw to bind AspxMenu by .xml file value