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
  1. Home
  2. Web Development
  3. ASP.NET
  4. problem with image tag

problem with image tag

Scheduled Pinned Locked Moved ASP.NET
helpdesign
5 Posts 2 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.
  • S Offline
    S Offline
    samrat net
    wrote on last edited by
    #1

    Hello Friend! I've created a page that create runtime control as follows HtmlAnchor ha = new HtmlAnchor(); ha.InnerHtml = "d"; but instead of displaying image, it shows alter text. when i create the img tag at design time it shows the image.i.e., path is ok. Please help me to show the image. Thanks

    D 1 Reply Last reply
    0
    • S samrat net

      Hello Friend! I've created a page that create runtime control as follows HtmlAnchor ha = new HtmlAnchor(); ha.InnerHtml = "d"; but instead of displaying image, it shows alter text. when i create the img tag at design time it shows the image.i.e., path is ok. Please help me to show the image. Thanks

      D Offline
      D Offline
      Declan Bright
      wrote on last edited by
      #2

      Try using the Image control:

      Image ha= new Image();
      ha.ID = "img2";
      ha.ImageUrl = @"Membership/img/icon-calendar.gif";
      ha.AlternateText = "d";

      Declan Bright www.declanbright.com

      modified on Friday, April 4, 2008 10:05 AM

      S 1 Reply Last reply
      0
      • D Declan Bright

        Try using the Image control:

        Image ha= new Image();
        ha.ID = "img2";
        ha.ImageUrl = @"Membership/img/icon-calendar.gif";
        ha.AlternateText = "d";

        Declan Bright www.declanbright.com

        modified on Friday, April 4, 2008 10:05 AM

        S Offline
        S Offline
        samrat net
        wrote on last edited by
        #3

        Sorry Friend! It stills show alter text when i am adding that control in table

        D 1 Reply Last reply
        0
        • S samrat net

          Sorry Friend! It stills show alter text when i am adding that control in table

          D Offline
          D Offline
          Declan Bright
          wrote on last edited by
          #4

          Try this:

          ha.ImageUrl = @"~/Membership/img/icon-calendar.gif";

          Have a look at the page source to see what is been written out to the browser and verify that the path is correct.

          Declan Bright www.declanbright.com

          S 1 Reply Last reply
          0
          • D Declan Bright

            Try this:

            ha.ImageUrl = @"~/Membership/img/icon-calendar.gif";

            Have a look at the page source to see what is been written out to the browser and verify that the path is correct.

            Declan Bright www.declanbright.com

            S Offline
            S Offline
            samrat net
            wrote on last edited by
            #5

            View Source is ok, it shows correct path.

            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