zahed zahed - 2 months ago 5
ASP.NET (C#) Question

Gallery is not showing after uploading into live site using ASP.NET C#

Below I am calling my gallery using Datalist in localhost gallery is showing and live site not showing.

<asp:DataList ID="dlImages" runat="server">
<li><a href="#cube">
<asp:Image ID="Image2" runat="server" class="cubeHide" ImageUrl='<%# Bind("ImageName", "/GalleryImages/{0}") %>' />
<div class="label_text">


1.Change ImageUrl from this:

ImageUrl='<%# Bind("ImageName", "/GalleryImages/{0}") %>'

To this:

ImageUrl='<%# Bind("ImageName", "~/GalleryImages/{0}") %>'

2.Make sure you have a folder called GalleryImages in the root of your website with the relevant image files.