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. How to change Forecolor of the linkbutton control?

How to change Forecolor of the linkbutton control?

Scheduled Pinned Locked Moved ASP.NET
tutorialgraphicsquestion
2 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.
  • Y Offline
    Y Offline
    yogita charhate
    wrote on last edited by
    #1

    Hi, I want to change the Forecolor of the LinkButton Control on its click event. I tried using this LbtnItemSold.ForeColor = System.Drawing.Color.ForestGreen; But I'm unable to get results. Actually I wanted to assign Custom Color i.e #b8d7aa not System defined like above one(ForestGreen) but I'm not able to achieve former and dont know how to achieve latter one. Please guide (which method or property I have to use please give example with your answer). Thank you.

    yog hui gfgh kgdgrt njjn hjgkn

    H 1 Reply Last reply
    0
    • Y yogita charhate

      Hi, I want to change the Forecolor of the LinkButton Control on its click event. I tried using this LbtnItemSold.ForeColor = System.Drawing.Color.ForestGreen; But I'm unable to get results. Actually I wanted to assign Custom Color i.e #b8d7aa not System defined like above one(ForestGreen) but I'm not able to achieve former and dont know how to achieve latter one. Please guide (which method or property I have to use please give example with your answer). Thank you.

      yog hui gfgh kgdgrt njjn hjgkn

      H Offline
      H Offline
      hakonvik
      wrote on last edited by
      #2

      You can add an attribute to the control using yourBtn.Attributes.Add("onclick","this.style.foreColor='#b8d7aa'"); ;) hv

      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