DefineSection() public method

public DefineSection ( string name, SectionWriter action ) : void
name string
action SectionWriter
return void
Example #1
0
 private static void RenderSectionAsLayoutRegion(WebPageBase webPage, string partialViewHtml, string sectionName)
 {
     webPage.DefineSection(
         sectionName,
         () =>
         {
             Action<TextWriter> writerAction = tw => tw.Write(partialViewHtml);
             var result = new HelperResult(writerAction);
             webPage.Write(result);
         });
 }