Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
How add img source path dynamically
I want to read image url from database


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

1 solution

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#.

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[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900