You the receive compile error when using XML literals and try to set an attribute using quotation marks…
Error message: "Expected matching closing double quote for XML attribute value."
Your code might look similar to this fragment:
Results in an error:
Dim output = From item In items
Select <Item ID="<%= item.ID %>">
</Item>
What's wrong? Just Remove the quotation marks. The <% %> syntax will insert them later.
Works fine:
Dim output = From item In items
Select <Item ID=<%= item.ID %>>
</Item>
The result as XML:
<Item ID="1">
</Item>
<Item ID="2">
</Item>
1 comment:
Thank you! Saved me some time and aggravation.
Post a Comment