In developing Sharepoint Webpart, if I need to add HTML Content to the output of my Web Part, right now I do it like this :
this.Controls.Add(new LiteralControl("<html content>");
If I need to output a large HTML Content with Data in it, I need to instantiate a lot new Literal Contents then there is a problem, that it will make my process slow and memory consuming.
Please tell some alternatives to this approach.
Just use a visual webpart where you get to use the WYSIWYG designer and if it needs to be deployed in a Sandboxed environment you can download one from the Power Tools extension.
Oh God, writing all that markup from code is a nightmare. By using a visual webpart you can make amazing looking webparts.
If you are going to use your own scripts or CSS files just create mapped folders for them and set the deployment option to their path.