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. change the font of master page control

change the font of master page control

Scheduled Pinned Locked Moved ASP.NET
6 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.
  • S Offline
    S Offline
    srinandan
    wrote on last edited by
    #1

    hi all :) i want to change font-weight of the hyperlink which is in masterpage i want to change from the content page thanks in advance thanks n regard srinandan

    G 1 Reply Last reply
    0
    • S srinandan

      hi all :) i want to change font-weight of the hyperlink which is in masterpage i want to change from the content page thanks in advance thanks n regard srinandan

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Use the Page.Master property to get a reference to the master page. Cast it to the exact class of your master page to access it's members.

      --- b { font-weight: normal; }

      S 1 Reply Last reply
      0
      • G Guffa

        Use the Page.Master property to get a reference to the master page. Cast it to the exact class of your master page to access it's members.

        --- b { font-weight: normal; }

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

        hi i have to change it font at runtime when the content page is load thanks

        G I 2 Replies Last reply
        0
        • S srinandan

          hi i have to change it font at runtime when the content page is load thanks

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          srinandan.. wrote:

          hi i have to change it font at runtime when the content page is load

          The content page is never loaded separately from the master page. Together they form the finished (x)html document that is sent to the browser.

          --- b { font-weight: normal; }

          1 Reply Last reply
          0
          • S srinandan

            hi i have to change it font at runtime when the content page is load thanks

            I Offline
            I Offline
            indianet
            wrote on last edited by
            #5

            Inside the content page Dim HyperLink1 as HyperLink HyperLink1=CType(Master.FindControl('HyperLink1'),HyperLink) HyperLink1 now contains the reference of HyperLink1 control placed in the master page Use Hyperlink1 to manipulate as you would do on a normal page.

            S 1 Reply Last reply
            0
            • I indianet

              Inside the content page Dim HyperLink1 as HyperLink HyperLink1=CType(Master.FindControl('HyperLink1'),HyperLink) HyperLink1 now contains the reference of HyperLink1 control placed in the master page Use Hyperlink1 to manipulate as you would do on a normal page.

              S Offline
              S Offline
              srinandan
              wrote on last edited by
              #6

              hi thanks a lot. this one idea is working properly we can do it as follows ((HyperLink)(Master.FindControl("HplID"))).Font.Bold = true; thanks srinandan

              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