public static List<RequestReturnValue> resultDataSet;
public MainPage()
{
InitializeComponent(); //设置当前界面线程
syncContext = SynchronizationContext.Current;
}
private SynchronizationContext syncContext;
private String postData = String.Empty;
private void PostData(object sender, RoutedEventArgs e)
{
//请注意:Silverlight 里的 HttpWebRequest, Encoding 类的属性和方法与常规的 .NET Framework 里面还是不同的。
result.Text = "开始提交数据……";
postData = "paramXml=" + data.Text; //要提交的内容
Uri url = new Uri("http://128.128.4.189:131/", UriKind.Absolute);
System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)WebRequest.Create(url);
request.Method = "POST"; //