如何使用c#中的httpwebresponse将数据从php页面传递到windows phone应用程序 [英] How to pass data from php page to windows phone apps using httpwebresponse in c#
本文介绍了如何使用c#中的httpwebresponse将数据从php页面传递到windows phone应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从php页面传递数据并使用MessageBox.show()显示在应用程序中
how to pass data from php page and display it in apps using MessageBox.show()
private void Track_Click(object sender, RoutedEventArgs e)
{
HttpWebRequest request =
(HttpWebRequest)HttpWebRequest.Create(attackUri);
request.BeginGetResponse(Showtext, request);
}
}
void Showtext(IAsyncResult result)
{
HttpWebRequest request = result.AsyncState as HttpWebRequest;
if (request != null)
{
try
{
WebResponse response = request.EndGetResponse(result);
var txt = request.Content.ReadAsStringAsync();
MessageBox.Show(txt.Result);
}
catch (WebException e)
{
}
}
推荐答案
这篇关于如何使用c#中的httpwebresponse将数据从php页面传递到windows phone应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文