Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Path of image control

$
0
0

I save image in folder and save its name in DB

I try to bind this image on asp image control. this control be visible in some cases only.

the problem is image does not displayed, display border of it only.

Note:       in Inspect element: Image control sees the full path of image.

<asp:Image runat="server" ID="img_ItemImage" Height="60" Width="60" ImageUrl='<%#"~/admin/InvenImages/" + Eval("InvenItemImage") %>'/>

Image img = img_ItemImage;
img.ImageUrl = HttpContext.Current.Server.MapPath("~/" + "admin/InvenImages" + "/" + hid_ItemImage.Value);
img_ItemImage.Visible = true;


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>