zoukankan      html  css  js  c++  java
  • C#通过http Get方式获取返回页中的XML

            int intProid = Proid;
            
    string strCardid = Cardid;
            
    int intPaytype = Paytype;
            
    int intOrderid = Orderid;
            
    string strKey = Key;
            
    string path = "http://192.168.6.6/cardsys/api/api.php?proid=" + intProid + "&cardid=" + strCardid + "&paytype=" + intPaytype + "&orderid=" + intOrderid + "&key=" + strKey + "";
            
    bool ReturnValue = true;
            ReturnDataset 
    = null;
            ErrorMessage 
    = null;

            
    try
            {
                Uri uri 
    = new Uri(path);
                WebRequest wreq 
    = WebRequest.Create(uri);
                HttpWebResponse wresp 
    = (HttpWebResponse)wreq.GetResponse();
                Stream s 
    = wresp.GetResponseStream();
                StreamReader objReader 
    = new StreamReader(s, System.Text.Encoding.GetEncoding("utf-8"));
                ReturnDataset.ReadXml(objReader);
            }
            
    catch
            {
                ReturnValue 
    = false;
            }
  • 相关阅读:
    迭代平方根
    windows怎么进如debug调试
    wxwidgets安装环境配置
    【android官方文档】与其他App交互
    Android ImageView图片自适应
    Gridview的stretchMode详解附自动宽度
    Activity生命周期解说
    一些问题
    android 文件读取(assets)
    android:scaleType属性
  • 原文地址:https://www.cnblogs.com/a311300/p/1738621.html
Copyright © 2011-2022 走看看