c# - ASP.NET HtmlTextArea attributes and newline -
I would like to change some features of HtmlTextArea in a SharePoint web part which is developing in C #. HtmlTextArea is being used as a customized display for some SQL Server 2005 data that I am dragging and I want to change the font, color, etc. and want to do it for read-only. I think there are a few ways, such as HtmlTextArea.Attributes.Add, HtmlTextArea.Attributes.AddAttributes, and HtmlTextArea.Attributes.CssStyle, but I'm not sure how to use it properly, nor how to use them. I know that with just one ASP.NET Textaria control I can use inline CSS, so I am trying to find a way to set inline CSS inside C #.
In addition to this, I would like to assist in placement, find a way to add a new line between the controls. I have put all my controls in CreateChildControls, but I do not think how I can control their placement. For example, I have something like this:
protected override zero CreateChildControls () {clients = new dropdown list (); Customers.ID = "Customer"; Controls.Add (customers); Machine = new dropdown list (); Machines. Id = "machine"; Controls.Add (machines); SpecsOutput = New HtmlTextArea (); SpecsOutput.ID = "specsOutput"; Controls.Add (specsOutput); }
I would like to display HtmlTextArea below ddls. Thanks for the help of each.
To add inline CSS, attributes.Add ("style", "Color: white ; Background-color: black ");
etc. e.t.c.
You can add LiteralControls
to help with the layout of your custom control. / P>
clients = new dropdown list (); Customers.ID = "Customer"; Controls.Add (customers); Control. Add (new literal control ("
Comments
Post a Comment