首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

跨网站交付数据

2013-03-01 
跨网站提交数据两个网站都在同一个服务器里面,网站A有个 a.aspx页面 我想把里面的两个变量数据 传给网站B

跨网站提交数据
两个网站都在同一个服务器里面,网站A有个 a.aspx页面 我想把里面的两个变量数据 传给网站B的 b.aspx
页面后台接收到这两个数据  该如何实现呢
[解决办法]


 StringBuilder sb = new StringBuilder();
        
        sb.Append("1");
        sb.Append("2");
string vpcURL = "https://b.aspx";
        System.Net.WebClient webClient = new System.Net.WebClient();
        webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
        byte[] response = webClient.UploadData(vpcURL, "POST", System.Text.Encoding.ASCII.GetBytes(sb.ToString()));
        string responseData = System.Text.Encoding.ASCII.GetString(response, 0, response.Length);

        string result = GetContent(responseData, "vpc_TxnResponseCode=", "&", 2);



在b页面 request传过去的数据

热点排行