Response.ContentType = "text/xml";
Response.Write(" <?xml version='1.0' encoding='utf-8'?>");
Response.Write(" <test>");
Response.Write(" <com>");
Response.Write(" <code>" + areader3.GetInt32(0).ToString() + " </code>");
Response.Write(" <name>" + areader3.GetString(1) + " </name>");
Response.Write(" <ext>" + areader3.GetString(2) + " </ext>");
Response.Write(" </com>");
Response.Write(" </test>");
xml格式的可以这样输出 那要输出json格式的该怎么写
Response.ContentType = "text/plain";
Response.Write("[{\"name\":\"a\"},{\"name\":\"b\"}]");
Response.ContentType = "text/xml";
Response.Charset = "UTF-8";
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.LoadXml(strXML);
doc.Save(Response.OutputStream);
Response.End();
context.Response.ContentType = "text/plain";
var orders;
可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......