Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# .NET include file

I searched a way to include a file in a web application (like a menu, so I won't have to edit it on all pages when applying changes), but haven't found something as simple as

<?php include "Menu.html"; ?>

Can you please help?

like image 766
Novak Avatar asked Dec 01 '22 06:12

Novak


2 Answers

Have you looked into Master Pages? They would certainly help you add the same layout across several pages.

Or perhaps you want a reusable User Control (that you write yourself)?

like image 123
Widor Avatar answered Dec 05 '22 17:12

Widor


We don't use "include page" in asp.net, even though it is possible (with a different syntax of course). Instead, have a look at Master page concept.

like image 33
walther Avatar answered Dec 05 '22 15:12

walther