Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically hiding an image in a repeater

Status
Not open for further replies.

sodakotahusker

Programmer
Mar 15, 2001
601
I am trying to set the visible property of an image using the Databinder.Eval. I tried returning a false or true string and a 0 and -1 numbers but I get the same error on the statement. Can I even do this. I only have picture in certain records so I hate showing the missing image icon.

<asp:Image runat=server ImageUrl = <%#DataBinder.Eval(Container.DataItem,"imagefile")%> visible=<%#DataBinder.Eval(Container.DataItem,"showimage")%> /> </td>
 
what error do you get???

Known is handfull, Unknown is worldfull
 
Use the .Visible property in the code behind to hide the image as the repeater binds.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top