Search code examples
asp.netcachinguser-controlscontrolsparsecontrol

Does ParseControl do any caching?


We use Page.ParseControl to interpret a string of XML into controls. Does it use some kind of caching mechanism? If not - is there a way to cache its result?

Page.LoadControl seems to support some sort of caching.


Solution

  • There does not seem to be any caching involved. As a Control is a reference types, caching wouldn't be recommended in this case. (You want a new instance of the control each time you call the ParseControl function)