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. SharePoint
  4. I replaced label with FieldLabel but i got an error

I replaced label with FieldLabel but i got an error

Scheduled Pinned Locked Moved SharePoint
sharepointgraphicshelpquestion
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.
  • H Offline
    H Offline
    HemadriT
    wrote on last edited by
    #1

    Hi, 'Microsoft.SharePoint.WebControls.FieldLabel' does not contain a definition for 'lblResults' and no extension method 'lblResults' accepting a first argument of type 'Microsoft.SharePoint.WebControls.FieldLabel' could be found (are you missing a using directive or an assembly reference?) lblResults.Text ="Files are Uploaded to Shared Document Library"; lblResults.Font.Bold = true; this.lblResults.ForeColor = System.Drawing.Color.Blue; Thanks, Hemadri.T

    I 1 Reply Last reply
    0
    • H HemadriT

      Hi, 'Microsoft.SharePoint.WebControls.FieldLabel' does not contain a definition for 'lblResults' and no extension method 'lblResults' accepting a first argument of type 'Microsoft.SharePoint.WebControls.FieldLabel' could be found (are you missing a using directive or an assembly reference?) lblResults.Text ="Files are Uploaded to Shared Document Library"; lblResults.Font.Bold = true; this.lblResults.ForeColor = System.Drawing.Color.Blue; Thanks, Hemadri.T

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      FieldLabel has no definition for .Text or .Font or .ForeColor. For usage take a look at http://zieglers.wordpress.com/2010/04/08/dynamically-creating-form-controls-in-sharepoint/[^] Alternatively use LiteralControl, it's a little bit easier to use. As it's included in HTML Code I think you should HTML-Tags to change Font or Color.

      ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

      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