c# - ASP.NET Output HTML within a control? Or some other way? -


was using literal control output ton of html, caused site load rather slowly. html user inputted , different, not sure control, if use. able string of html within umbraco outputted, problem having how output html in way doesn't destroy site on system resources. cause right now, literal control outputting html, takes 20 minutes page load , ruins entire site 5 minutes after due taking 100% system resources.

how can output html within page? have seen code here:

public string rendercontroltohtml(control controltorender) {     system.text.stringbuilder sb = new system.text.stringbuilder();     system.io.stringwriter stwriter = new system.io.stringwriter(sb);     system.web.ui.htmltextwriter htmlwriter = new system.web.ui.htmltextwriter(stwriter);     controltorender.rendercontrol(htmlwriter);     return sb.tostring(); } 

but, first, looks it meant render control. don't have control, have html already. don't know how use control, other literal control output html. basically, html within method , string this:

thepillarspage.html

how can use output content within section of page? method above looks nice, not sure thepillarspage.html string should fit method, or if possible method?

thanks :)


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -