易截截图软件、单文件、免安装、纯绿色、仅160KB

如何提交xml类型数据 - .NET技术 / ASP.NET

数据库表中有一列(TranXml)类型是xml,存储的是类似
<fathernode>
  <a>aaa
  </a>
  <b>bbb
  </b>
</fathernode>
的信息,并且通过查询方法返回了一条符合条件的DataRow,
现在我想取出这条DataRow中的TranXml列的信息,通过点击提交按钮将其提交到另一个页面(GetXml.aspx),
请问前后台具体怎么实现?
自己先顶一下,不知道可不可以用form提交

string xml=TranXml列的值
 byte[] sendContent = Encoding.GetEncoding("gb2312").GetBytes(xml);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("GetXml.aspx");
  request.ContentLength = sendContent.Length;
  request.ContentType = "text/xml";
  request.Method = "POST";

  Stream stream = request.GetRequestStream();
  stream.Write(sendContent, 0, sendContent.Length);
  stream.Close();
  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
GetXml.aspx
  Stream s = Request.InputStream;
  StreamReader reader = new StreamReader(s);
  string xml = reader.ReadToEnd();



相关问答:

asp.net分页问题

select top 12 * from Product where [id] not in (select top 12 [id] from Product)
这样可以分页,但是我在后面想加个条件
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......

asp.net后台调用js方法 - .NET技术 / ASP.NET

<script type="text/javascript" src="js/Dialog.js"></script>
<script type="text/javascript">
  function zOpenD()
  {
  va ......

asp.net中可输入的下拉框的问题 - .NET技术 / ASP.NET

Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.Design
Imports System.Web.UI.WebControls
Namespace CBDAspNet.WebControls.HTML
  ''' <summary>
  '' ......

ASP.NET数据插入与更新!

dsQuyMst.Tables["QuyMst"].Rows[0]["SHDOCO"] = "1111";//这句报错(未将对象引用设置到对象的实例。)
这知道是什么原因?
高人指点~~~
using System;
using System.Data;
us ......

利用C#编写txt转化到xml的程序

txt 和XML 格式相应
不借助DataSet
导入读取TXT文件
然后直接写入XML(同一文件,不同数据,递增原数据没有被覆盖情况下增加数据.)
教个要点或最好是有个代码提示的
过路好汉 帮个忙撒^^
不会,帮楼主 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号