downloadstring

    1熱度

    1回答

    我正在製作Windows Phone 8應用程序。我有目標位置的經緯度。我需要獲得目標位置的雙字母ISO國家代碼。 我正在使用下面的代碼來實現它。 'Dim address As String = puri 'Dim client As WebClient = New WebClient() 'Dim reader As StreamReader = New Stream

    0熱度

    2回答

    這裏是我的代碼 try { for (int i = 0; i < RichTextbox2.Lines.Length; i++) { var length = urlwebapi.Lines.Length; { WebClient f = new WebClient(); dynamic read = f.Download

    0熱度

    1回答

    我正在嘗試創建一個基於貨幣轉換器的Windows Phone 7.1應用程序。我正在使用DownloadStringAsync方法獲取包含特定網站匯率的短字符串。我在Visual Studio 2010中測試過,DownloadString工作得很好。但不適用於電話應用程序。我需要在這裏做什麼?我無法真正理解它。 Partial Public Class MainPage Inherits Ph

    2熱度

    3回答

    我想從URL下載一個字符串。不幸的是,它非常緩慢。 這裏是我的代碼: // One of these types for two bad solutions anyway // byte[] result = new byte[12]; // string result; using (var webClient = new System.Net.WebClient(

    0熱度

    1回答

    我想獲取網頁的內容,但試圖訪問它顯示此錯誤 「非法字符在路徑」 我的問題是我如何解決它,有一個更好的方法來得到 頁面的內容現在我得到了Windows應用程序和網頁瀏覽器的內容,並沒有錯誤,但在ASP 我的代碼 Dim client As New Net.WebClient TextBox1.Text = client.DownloadString("www.url.com/") 和

    2熱度

    2回答

    我想從Google財經導入文本數據,並使用此http地址作爲DownloadStringhttp://www.google.com/finance/getprices?i=1200&p=1d&f=d,o,h,l,c,v&df=cpct&q=AAPL的參數。但是,由此產生的字符串會丟失任何換行符,因此解析起來非常困難。有任何想法嗎?

    0熱度

    2回答

    我試圖從一個網站使用webclient和下載字符串下載的字符串中找到Mauricio的索引。然而,在網站上它包含一個外國人物Maurício。所以我在其他地方發現了一些代碼 string ToASCII(string s) { return String.Join("", s.Normalize(NormalizationForm.FormD) .Where(c => ch

    1熱度

    1回答

    服務器如果一個對象是能夠發送,但如何動態使用JSON序列化和deserializtion發送對象的名單,並且創造modal.this應該是JSON字符串 [{「city_id 「:」 1" , 「STATE_NAME」: 「狀態1」},{ 「city_id」: 「1」, 「STATE_NAME」: 「22」}]。 要發送單個對象我的代碼如下 NSString *[email protected]"

    1熱度

    3回答

    下面的代碼: WebClient wc = new WebClient(); wc.Encoding = Encoding.UTF8; string Url = "http://www.tsetmc.com/tsev2/data/instinfodata.aspx?i=59266699437480384&c=64"; return wc.DownloadString(Url); 代碼返回

    2熱度

    3回答

    我正在使用Spring @ MVC3,並且遇到了問題。 Spring bean已創建,但@Autowired不能在類中使用。這裏是我的設置和源代碼: XXX-servlet的.XML: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xml