Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. how to display image description? [modified]

how to display image description? [modified]

Scheduled Pinned Locked Moved .NET (Core and Framework)
javascripthtmldatabasedesignhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mujin03
    wrote on last edited by
    #1

    I have a repeater control to display thumbnail pictures. The itemtemplate is made of a web image control. When user clicks on the thumbnail picture, I want it to display a larger image in a web image control and display the image description in a label control( the image description is saved in database). My current code is : I have a getPhoto function which will get the thumbnail pictures through IhttpHandler and bound to the repeater control. Then I have a repPhotoG_ItemDataBound function, here I add the javascript to the image html control and call a javascript to pass the thumbnail imagename as parameter and show the large image. :^) Now, I can get the thubnail picture and display the large images, but I just don’t know how to get and display the image description. Please help!! private void repPhotoG_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e) { //finding repeater item Image System.Web.UI.HtmlControls.HtmlImage img=(System.Web.UI.HtmlControls.HtmlImage)e.Item.FindControl("iPhoto"); //create a relative path for image and add onclick function img.Src=img.Src.Replace('\\', '/'); string Description=""; string Image; Image=IMGpath(img.Src); img.Attributes["onclick"]="showImg('"+Image+"')"; } function showImg(imgName) { imgOn = ("" + imgName); document.imgLarge.filters[0].Apply(); document.imgLarge.src = imgOn; hdr.innerHTML=imgName; document.imgLarge.filters[0].Play(); -- modified at 17:29 Monday 5th June, 2006

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups