我的代码如下:
ServiceReference1.ImageFile imagefile = new ServiceReference3.ImageFile();
imagefile.ImageName = fileName;
imagefile.Imagestream = bytes;
ServiceReference3.Service1Client service = new ServiceReference3.Service1Client();
service.UploadCompleted += new EventHandler<ServiceReference3.UploadCompletedEventArgs>(service_UploadCompleted);
service.UploadAsync(imagefile);
这里没有创建ServiceReference1如何在xaml.cs页面中创建服务引用并使ServiceReference1可用。任何人都对我有很大的帮助
答案 0 :(得分:1)
MSDN教程:How to: Access a Service from Silverlight用于添加服务引用或用于Web引用
您可以这样做查看详细信息:Add Web Reference to Silverlight Application