XElement xml = new XElement("MyMenu",
from c in db.Security_Module_Menus
//where (c.ParentID == 0)
orderby c.Menu_ID
select new XElement("Item",
new XAttribute("Text", c.Menu_Name), new XAttribute("NavigateUrl", c.Target_URL)
)
);
From my above syntax c.Menu_Name,c.Target_URL values are nullable.Show me the error
Value cannot be null. Parameter name: value I know SetElementValue() used to solve this error.But how can i use to my above syntax.Help me to Use it.Show me syntax