using System; using System.Windows; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; using System.Net; namespace PhoneApp { public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); Loaded += MainPage_Loaded; } WebClient client; private void MainPage_Loaded(object sender, System.Windows.RoutedEventArgs e) { string url = "http://localhost/myphp/hello.php"; Uri uri = new Uri(url); client = new WebClient(); client.AllowReadStreamBuffering = true; client.DownloadStringCompleted += client_DownloadStringCompleted; client.DownloadProgressChanged += client_DownloadProgressChanged; client.DownloadStringAsync(uri); } private void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { if (e.Cancelled == false && e.Error == null) { System.Threading.Thread.Sleep(2000); string textString = Convert.ToString(e.Result); this.txtResult.Text = textString; } } private void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e) { this.txtResult.Text = "Loading..."; } } }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง