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