Click here to Skip to main content
14,389,022 members
Rate this:
Please Sign up or sign in to vote.
See more:
How add img source path dynamically
I want to read image url from database


<asp:Image ID="slide1" runat="server" />
       <img Src="?????"
    </div>
Posted
Comments
   
Why are you having two image tags?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You can do it in page load. As long as you have runat="server" on a control you can modify it's attributes in C#.

slide1.ImageUrl=<url to="" the="" image="">;
</url>


http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.image%28v=vs.110%29.aspx[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100