解決IE9 IE8的跨域 請求問題

/// <summary>
/// 根據url獲取對應的HTML
/// </summary>
/// <param name="url"></param>
/// <returns></returns>
[Request("GET", "getHtml.aspx")]
public View GetHtml(string url)
{
WebClient wc = new WebClient();
wc.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko");
var datas = wc.DownloadData(url);
string strHtml = Encoding.UTF8.GetString(datas);
return new TextView(strHtml);
}ide

作個本地跳轉url

相關文章
相關標籤/搜索