0

I'm developing wp7 app . i have a problem with this cod i want to get values of table from a webservice and show it in msg box the problem is i have two tables in a web service but in foreach only the first value can shown in two times any one can help by knowing the prob???

foreach (XElement nod in resultElements.Elements(@"studentPunishmentsTable"))
    {
         s.penalty = resultElements.Element("studentPunishmentsTable").Element("penalty").Value;
         MessageBox.Show(s.penalty);     
    }

Edited by pyTony: not code snippet, but question

1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by NPDA
0

the solution is:

Inline Code Example Here

> foreach (XElement nod in resultElements.Elements(@"studentPunishmentsTable"))

{

s.panalty=nod.element("penalty").value;
messageBox.show(s.penalty);
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.