//Create a streamwriter to write to the memory stream
StreamWriter WriteStream = new StreamWriter(ReturnStream,System.Text.Encoding.GetEncoding("GB2312"));
//Write the text in the textbox to the Memory Stream.
WriteStream.WriteLine("写入的内容");
yes, you can use MemoryStream, but you have to work on bytes and convert from/to string, I would suggest you use a String or StringBuilder in the Session variable
StringBuilder sb = new StringBuilder();
Session["MyVar"] = sb;