Hi Friends!
I am getting problem in image control. I have dragged an image control and i want to assign url to it. It just accept the image url from its project folder. But i want to give it url from any where in my hard drive. Like....
myImage.ImageUrl = "C:\\Users\\Zeb-Ur-Rehman\\Documents\\a.jpg";
But it only accept the url from its project folder Like...
myImage.ImageUrl = "~/Images/a.jpg";
Thanks in advance.
Image Control
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
SenthilkumarRank #387 · 6.5K pointsPosted Apr 14, 2012, 6:16 AM EDT
I do no think you can assign the image from the hard drive any where.
It should be in web server and you can use the server.mappath() or you can use the relative url.
see more info on:
http://www.maconstateit.net/tutorials/aspnet40/ASPNET04/aspnet04-03.aspx