我有一个xml文件,请参阅此链接:XML
用户名:admin
密码:admin
我正在使用Ajax jquery和Json连接并从这个url xml获取数据。
代码是什么工作的?单击按钮(OnClientClick)时它的工作。它从ajax调用函数到c#中的代码。
function Getdata() {
$.ajax({
crossDomain: true,
type: "POST",
contentType: "application/json; charset=utf-8",
async: false,
url: "http://huysoi.com/data.xml",
username: 'admin',
password: 'admin',
data: '',
dataType: "jsonp",
success: // i need to help here
// if it's success, i want to get all data in this url XML as TEXT
// It's mean, all data will be in TEXT
// If yes, i can download this Text file to my PC
// That is my idea.
});
}
我会尽力向你展示我的想法,对不起,如果我的问题不清楚的话。