ASP.net和C#常用代码收集(不断添加ing)

1、Xml to string

XmlDocument x = new XmlDocument();
x.LoadXml(m.GetMenuXML());
StringWriter stringWriter = new StringWriter();
XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter);
x.WriteTo(xmlTextWriter);
TextBox1.Text = stringWriter.ToString();


你可能感兴趣的:(xml,C#,asp.net,textbox)