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. C#
  4. How I Change Menu Css on page load Event OR Runtime

How I Change Menu Css on page load Event OR Runtime

Scheduled Pinned Locked Moved C#
cssquestion
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.
  • I Offline
    I Offline
    IshtiaqueJ
    wrote on last edited by
    #1

    I have one Master page in master page i have create menu using link button and i have apply Same Css on All. And I have 5 content page. I want when my content page one is load Then Change CSS of specify link button. I Try This Code But this Code not Working properly. protected void Page_Load(object sender, EventArgs e) { MasterPage pharmacyMaster = (Pharmacy_ICaremaster)this.Master ; LinkButton mastrlbtnCategory = pharmacyMaster.FindControl("lbtnCategory") as LinkButton; mastrlbtnCategory.CssClass = "cssAMainLink:visited"; } how Can I Do It. Reply urgently . thanks in Advance. Ishtiaque Hussain Jalbani.

    K L 2 Replies Last reply
    0
    • I IshtiaqueJ

      I have one Master page in master page i have create menu using link button and i have apply Same Css on All. And I have 5 content page. I want when my content page one is load Then Change CSS of specify link button. I Try This Code But this Code not Working properly. protected void Page_Load(object sender, EventArgs e) { MasterPage pharmacyMaster = (Pharmacy_ICaremaster)this.Master ; LinkButton mastrlbtnCategory = pharmacyMaster.FindControl("lbtnCategory") as LinkButton; mastrlbtnCategory.CssClass = "cssAMainLink:visited"; } how Can I Do It. Reply urgently . thanks in Advance. Ishtiaque Hussain Jalbani.

      K Offline
      K Offline
      Krazy Programmer
      wrote on last edited by
      #2

      how about asking this in ASP.NET Forum ... :-)

      If You win You need not Explain............ But If You Loose You Should not be there to Explain......

      1 Reply Last reply
      0
      • I IshtiaqueJ

        I have one Master page in master page i have create menu using link button and i have apply Same Css on All. And I have 5 content page. I want when my content page one is load Then Change CSS of specify link button. I Try This Code But this Code not Working properly. protected void Page_Load(object sender, EventArgs e) { MasterPage pharmacyMaster = (Pharmacy_ICaremaster)this.Master ; LinkButton mastrlbtnCategory = pharmacyMaster.FindControl("lbtnCategory") as LinkButton; mastrlbtnCategory.CssClass = "cssAMainLink:visited"; } how Can I Do It. Reply urgently . thanks in Advance. Ishtiaque Hussain Jalbani.

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        Head off to the ASP.NET forum.

        xacc.ide - now with TabsToSpaces support
        IronScheme - 1.0 beta 1 - out now!
        ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

        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