How to assingn http://localhost2133/folnername/image.jpg to image control in silverlight [Resolved]

Posted by balajirnaukri-12656 under Silverlight on 5/4/2012 | Points: 10 | Views : 1302 | Status : [Member] | Replies : 2
My question is im having a local silverlight application I want to assign the http://folnername/image.jpg value to the image control in the silverlight.I am not getting the output.whereas if I give the link as something like this D:/folnername/image.jpg I am getting the output.how this http:/localhost/foldername/image.jpg could be done??????

Thanks and Regards
Balaji.R
ASP.NET Devloper
Solve-IT corp



Responses

Posted by: balajirnaukri-12656 on: 5/4/2012 [Member] Starter | Points: 25

Up
0
Down

Resolved
hi Vuyiswamb,

I also thought the same when seeing some links.But when you convert your image into imagesource datatype add the following code.

new BitmapImage(new Uri('http:/localhost/foldername/image.jpg', UriKind.Absolute))

if you do this you can add those image into silverlight image controls................



Thanks and Regards
Balaji.R
ASP.NET Devloper
Solve-IT corp

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 5/4/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
You should not do the http:/localhost/foldername/image.jpg to reference your images because if you have to deploy your app you need to go and change it again . use a Relative Path

../Images/myjpeg.jpeg"


Thank you for posting at Dotnetfunda
[Administrator]

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response