0

I am using repeater control in my web page.I am using an anchor tag and an image within the repeater.The idea is when the page loads the image and corresponding URL should be loaded from the database.

The problem is when i point the cursor on the image,instead of exact URL the URL is combined with the project name.

For example the URL i should get is www.facebook.com,but what i am getting is
localhost:64396/CMS/www.facebook.com

The repeater control i have used is furnished below

<asp:Repeater ID="rpt_img_footer" runat="server">
   <ItemTemplate>
       <a href="<%#Eval("IMAGE_URL") %>"><img alt="<%#Eval("IMAGE_NAME") %>"
        src="<%#Eval("IMAGE_PATH") %>" width="32px" height="33px" /></a>
   </ItemTemplate>
</asp:Repeater>
4

1 回答 1

1

You should include the protocol in the src attribute as well, try it with http:// in front : http://www.facebook.com instead of just www.facebook.com. Otherwise it'll be src definition relative to the path of the page itself.

于 2013-05-27T07:58:02.387 回答