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. Image Button with Text

Image Button with Text

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
3 Posts 3 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
    Madhu Balan
    wrote on last edited by
    #1

    How to add a text with the Image button ? I am adding a Image button in a Panel Bar at the run time. We can providea Tooltip for an Image, but how to provide an Text for an Image Button. i.e. Image with Some text as one Image button. With Thanks & Regards, Madhu .

    U S 2 Replies Last reply
    0
    • M Madhu Balan

      How to add a text with the Image button ? I am adding a Image button in a Panel Bar at the run time. We can providea Tooltip for an Image, but how to provide an Text for an Image Button. i.e. Image with Some text as one Image button. With Thanks & Regards, Madhu .

      U Offline
      U Offline
      User 821818
      wrote on last edited by
      #2

      why dont you use a regular asp:button and create a CSS class for it. That way you can have anytext you want on the graphical button. Like: in the CSS file, create the css class for this INPUT.PCTButton { width:129px; /*image with*/ height:25px; /*image height*/ background-image: URL(img/ButtonBg1.gif); /*the image background*/ border: 0px; background-color:Transparent; Cursor:hand; } serkan

      1 Reply Last reply
      0
      • M Madhu Balan

        How to add a text with the Image button ? I am adding a Image button in a Panel Bar at the run time. We can providea Tooltip for an Image, but how to provide an Text for an Image Button. i.e. Image with Some text as one Image button. With Thanks & Regards, Madhu .

        S Offline
        S Offline
        sivilian
        wrote on last edited by
        #3

        You can use GDI in the System.Drawing namespace to load an image into an obect and manipulate it, (add text to it) and then save it. A common technique in ASP.NET is to set the ResponseStream of an aspx page to the stream containing the image, and change the content type to the image type. This way an aspx page can act as an image and can be set as the image for an image button. hope this helps, sivilian

        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