C#软件对接asp.net的接口,返回给他xml数据处理 asp.netxml 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在write后面添加如下代码 context.Response.Write(""); context.Response.End();//关闭输出流,不然会将页面结构返回 大致是: if (table.Rows.Count > 0) //大于说明有这个会员 { if (table.Rows[0]["Password"].ToString() == Encrypt.EncryptPwd(pwd.Trim(), "MD5")) //判断密码是否正确 { report= DataToXml.CDataToXml(table)); 这里返回他的xml信息 } else { report = Encoding. "0"; //0就是帐号或者密码错误 } } else { report = "0"; } byte[] rep = Encoding.Utf8.GetBytes(report); context.Response.OutputStream.Write(rep, 0, rep.Length); 大致是 if (table.Rows.Count > 0) //大于说明有这个会员 { if (table.Rows[0]["Password"].ToString() == Encrypt.EncryptPwd(pwd.Trim(), "MD5")) //判断密码是否正确 { report= DataToXml.CDataToXml(table)); 这里返回他的xml信息 } else { report = "0"; //0就是帐号或者密码错误 } } else { report = "0"; } byte[] rep = Encoding.Utf8.GetBytes(report); context.Response.OutputStream.Write(rep, 0, rep.Length); 返回json数据比较好些,处理也方便。大家基本都是这样做的。 想请问byte[] rep = Encoding.Utf8.GetBytes(report); context.Response.OutputStream.Write(rep, 0, rep.Length);这样的写法和我的写法有什么区别呀?还有,我想在xml里面加入table另外的数据,比如说当前服务器时间。应该怎么加进去? "GetDataSet" 方法没有采用1个参数的重载 数据库连接问题 asp.net中使用线程及更新UI中的process bar问题 mvc3中 按钮提交 验证 并变灰问题 百分求.net开源文章管理系统(CMS),非常感谢! 关于框架页内 互相引用的问题 关于用三层结构开发web应用程序 asp.net如何实现留言板??急呀 在问一个网站发布问题,如果是虚拟空间怎么办? 初学者问题,到底学习asp.net该从何入手?? asp.net websocket 摄像头拍照相问题
context.Response.End();//关闭输出流,不然会将页面结构返回
if (table.Rows.Count > 0) //大于说明有这个会员
{
if (table.Rows[0]["Password"].ToString() == Encrypt.EncryptPwd(pwd.Trim(), "MD5")) //判断密码是否正确
{
report= DataToXml.CDataToXml(table)); 这里返回他的xml信息
}
else
{
report = Encoding. "0"; //0就是帐号或者密码错误
}
}
else
{
report = "0";
}
byte[] rep = Encoding.Utf8.GetBytes(report);
context.Response.OutputStream.Write(rep, 0, rep.Length);
if (table.Rows.Count > 0) //大于说明有这个会员
{
if (table.Rows[0]["Password"].ToString() == Encrypt.EncryptPwd(pwd.Trim(), "MD5")) //判断密码是否正确
{
report= DataToXml.CDataToXml(table)); 这里返回他的xml信息
}
else
{
report = "0"; //0就是帐号或者密码错误
}
}
else
{
report = "0";
}
byte[] rep = Encoding.Utf8.GetBytes(report);
context.Response.OutputStream.Write(rep, 0, rep.Length);
大家基本都是这样做的。
想请问
byte[] rep = Encoding.Utf8.GetBytes(report);
context.Response.OutputStream.Write(rep, 0, rep.Length);
这样的写法和我的写法有什么区别呀?
还有,我想在xml里面加入table另外的数据,比如说当前服务器时间。应该怎么加进去?