2013-02-19 110 views
0
 Uri uri = new Uri("" + metric.Image, UriKind.Absolute); 

     ImageSource imgSource = new BitmapImage(uri); 

     ImageMetric.Source = imgSource; 

我有下路径保存图像此代码访问图像

在数据库IM /UploadedImages/greenarrow.png

UploadedImages和我的溶液夹置于E盘。

但是不同的文件夹。

如何访问它?

请帮我

回答

0

我终于找到了答案

,而你正在主持在IIS中的网站,你可以在其中创建一个图像文件夹,并从数据库中保存图像

,让你可以浏览链接并找到图像。

Uri uri = new Uri(“http://www.abc.com”+ fieldname.Image,UriKind.RelativeOrAbsolute); ImageSource imgSource = new BitmapImage(uri); ImageMetric.Source = imgSource;