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. html label

html label

Scheduled Pinned Locked Moved ASP.NET
htmlquestion
7 Posts 4 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.
  • L Offline
    L Offline
    lhahehal
    wrote on last edited by
    #1

    hi there , is there any possibilty that i can apply a setting to a html label ... something like Label1.Font.Name = dl.SNameFont ??

    C G I 3 Replies Last reply
    0
    • L lhahehal

      hi there , is there any possibilty that i can apply a setting to a html label ... something like Label1.Font.Name = dl.SNameFont ??

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Yes, but since Font is an immutable object (meaning it doesn't change once created) you have to create a new Font object and assign that as you cannot change a property on an existing font object. ColinMackay.net "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell

      1 Reply Last reply
      0
      • L lhahehal

        hi there , is there any possibilty that i can apply a setting to a html label ... something like Label1.Font.Name = dl.SNameFont ??

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

        Just add it to the style property: Label1.Style.Add("font-family", "Verdana,Arial,Helvetica,sans-serif"); --- b { font-weight: normal; }

        L 1 Reply Last reply
        0
        • G Guffa

          Just add it to the style property: Label1.Style.Add("font-family", "Verdana,Arial,Helvetica,sans-serif"); --- b { font-weight: normal; }

          L Offline
          L Offline
          lhahehal
          wrote on last edited by
          #4

          hmm i thought html label does not have a id ?

          G 1 Reply Last reply
          0
          • L lhahehal

            hi there , is there any possibilty that i can apply a setting to a html label ... something like Label1.Font.Name = dl.SNameFont ??

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

            use the <asp:Label object of the web server control There you can change the font value that you need to. 1 line of code equals many bugs. So don't write any!! -- modified at 14:52 Wednesday 1st February, 2006

            L 1 Reply Last reply
            0
            • L lhahehal

              hmm i thought html label does not have a id ?

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

              What do you mean? Don't you have an id on the element? Of course it's still possible to locate it through the page control tree, but it's a lot easier if you put an id on it. --- b { font-weight: normal; }

              1 Reply Last reply
              0
              • I Ista

                use the <asp:Label object of the web server control There you can change the font value that you need to. 1 line of code equals many bugs. So don't write any!! -- modified at 14:52 Wednesday 1st February, 2006

                L Offline
                L Offline
                lhahehal
                wrote on last edited by
                #7

                may i ask why do they give me an error for DIV1.Style.Add("font-color", "'" + Color.FromName(dl.SNameColor) + "'")

                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