Cannot Set a Value on Node Type 'Element'

You will receive an InvalidOperationException with this error message if you try to use the Value property of an XmlNode to set the node’s value.  You need to set the value using the InnerText property instead.

Thank you to this blog post for documenting the issue and its fix:  http://www.neilpullinger.co.uk/2008/03/cannot-set-value-on-node-type-element.html

Comments

Anonymous
TKSSSSSSSSSSSSSSSSSSS
Sandeepya
Thanks !
Anonymous
This helped me a lot - a huge Thanks from Germany!