我有这个服务器端代码:
<?php
header('Content-Type: text/xml');
?>
<?xml version="1.0" encoding="utf-8" ?>
<Data>
<Entry> <?php echo time(); ?> </Entry>
</Data>
这在 Windows Phone 应用程序上:
Imports System.Xml.Linq
Partial Public Class MainPage
Inherits PhoneApplicationPage
Public Sub New()
InitializeComponent()
End Sub
Private Sub cl_DownloadStringCompleted(sender As Object, e As System.Net.DownloadStringCompletedEventArgs)
Dim doc = XDocument.Parse(e.Result)
TextBox1.Text = doc.<Data>.<Entry>.Value
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
Dim cl As New WebClient
AddHandler cl.DownloadStringCompleted, AddressOf cl_DownloadStringCompleted
cl.DownloadStringAsync(New Uri("http://localhost/wp/helloworld.php"))
End Sub
End Class
但这是我的问题:它不会改变值!它一直显示相同的东西!它一定是类似于缓存内存的东西......(?)
有任何想法吗 ?