<p>I am trying to create an XML file based on data fields from a table, and I want to have the nodes named based on the value in a field from the table. The problem is that sometimes values entered in that column contain spaces and other characters not allowed in Node names.</p>

<p>Does anyone have any code that will cleanup a passed in string and repalce invalid characters with replacement text so that it can be reversed on the other end and get the original value back?</p>

<p>I am using .net (vb.net but I can read/convert c#)</p>

I remember back in the day with 1.1 Visual Studio used to destroy my event handler hookups occasionally.
If you are using Visual Studio 2003, make certain that the "generated" code still contains the event handler wireup for your control.