i wanna fetch UseId 3 on page...i tried this code but it's not working.
XDocument xmlDoc = XDocument.Load(xmlfile);
int i = 0;
i = xmlDoc.ChildNodes(0).LastChild.Attributes("UserId").Value;
ANyone has idea??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AnkurPosted Oct 28, 2010, 7:56 AM
please try this, hope it would be helpful (tried in WPF).
string userId = XDocument.Load(xmlFile).Element("Users").Elements("User").Last().Attribute("UserId").Value;
Thanks and Regards
ankur malik
Raj KumarPosted Oct 29, 2010, 12:01 AM