i have some c# code that pulls value from an XML file. The code works, but I am positive there is a better way to code this - i’m sure using a “while” statement.
note: linkDesc1, linkDesc2, linkDesc3 are asp:label controls.
i guess i have two specific questions:
1)how do you setup a variable to refer to a series of control IDs, eg linkDescN for linkdesc1/2/3
2)I would think I wouldnt need a new string for nav1/nav2/nav3. isnt there a way to just replace nav1 with the next iterator value.
this is what I am using for XML, but i have no doubt it could be better.
<?xml version=“1.0”?>
<Links>
<Description>this is a story <br> it is really good</Description>
<Description>test desc</Description>
<Description>this is another test description</Description>
<Url>www.google.com</Url>
<Url>www.yahoo.com</Url>
<Url>test.com</Url>
</Links>