uhm i dont understand your problem but why dont you just split the string - after cutting the "D" and "MT>" away - at every ','
String[] parts = Data.Split(new Char {','});
Data is a String with your incoming data
Then you can do
for (int i = 0; i < Data.Length; i++)
{
TextBox1.Text = String.Format("var{0}={1}", i.ToString, ((Data[i] != null) &&(Data[i] != "")) ? Data[i] : "\"\"" );
}
HINT:
if you dont know that construction of (condition) ? true : false
i explain it here in short
int x = 5;
String text = (x ==5) ? "Yes, X is 5" : "No, S is not 5";
so this is like an if condition, but more like a "inline" if (C++ Coder might understand this in that way)
so the thing after the ? and before : is the output if the condition true if not then the output is the thing after the :
thats all