Any alternative to ASP.NET page templates?

Classic ASP had a "server side", so it was easy to create a common layout for the header, footer, left or right sidebar.

In ASP.NET, I think we should use "Page Templates". Although most people say they are easy to use, I find it pretty complicated, since we have to copy all the HTML inside the Render function. Is there a simpler method? Can I load code from an HTML file and not paste all the code into the "Render" function?

Or is there a better alternative to Page Templates?

+3
source share
5 answers

, Master Pages ASP.NET(2.0 ).

  • .
  • .
  • "" .

, , html Init/Load/Render, ASP.NET .

, , - Essential ASP.NET 2.0 Frtiz Onion. - 2.

+12

ASP.Net 2.0+ -.

+1

- , , ASP.

0

. .master, , . , Headers, . <asp:content id='page_contents'>, , .

, , .

0

MasterPages - , . . , .

0

Source: https://habr.com/ru/post/1698163/


All Articles