Last post Dec 10, 2020 09:46 AM by PatriceSc
Dec 04, 2020 03:16 AM|dongtrien|LINK
Suppose I have 2 files: Main.html and Home.html, in Main.html page there is html code with the following menu:
<ul class="nav justify-content-center">
<li class="nav-item"><a class="nav-link" href="Home.html">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#">ServiceForum</a></li>
<li class="nav-item"><a class="nav-link" href="#">Question</a></li>
<li class="nav-item"><a class="nav-link" href="#">Forum</a></li>
<li class="nav-item"><a class="nav-link" href="#">Contac</a></li>
When I click on "Home" from the menu, the Home.html is opened but not in the green area of the Main.html page, so when I click on "Home" from the menu, how do I edit the above code? In
addition, when Home loaded by default is also loaded in the green area, how is the above code written? You see the attached photo file: http://www.mediafire.com/view/gl9wr7zw7wkyu9w/DesignLoadItemWebEn.jpg/file
Dec 04, 2020 11:01 AM|mgebhard|LINK
Dec 05, 2020 05:04 PM|bruce (sqlwork.com)|LINK
How you do this depends on the server web technology. Here are the common approaches
Dec 07, 2020 01:30 PM|PatriceSc|LINK
Or if using HTML only is not done on purpose, you have also ASP.NET server side features to handle this depending if you are using Web Forms, ASP.NET 4.x MVC or ASP.NET Core MVC to "assemble" markup into a single HTML page (such as "master and content pages"
or "MVC layouts" and more)
Dec 09, 2020 08:24 AM|dongtrien|LINK
I have read the documents you sent me but I do not understand, I write the code in Sublime Text 3 if I run it I will switch to asp.net, do you have specific examples ?
Dec 10, 2020 09:46 AM|PatriceSc|LINK
So even though you are posting to an ASP.NET forum you really don't have any server side code for now?
With ASP.NET MVC a possible option is to use
https://www.tutorialspoint.com/asp.net_core/asp.net_core_razor_layout_views.htm which allows to define the general site appearence and renders the content particular to each page.