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
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)
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 ?
Member
6 Points
85 Posts
How to load html page into the main page ?
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:
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
All-Star
52231 Points
23300 Posts
Re: How to load html page into the main page ?
Dec 04, 2020 11:01 AM|mgebhard|LINK
An iFrame or JavaScript will work with HTML.
https://www.w3schools.com/howto/howto_html_include.asp
https://www.w3schools.com/html/html_iframe.asp
Classic ASP
https://www.w3schools.com/asp/asp_incfiles.asp
Google Search
https://www.google.com/search?q=html+include
All-Star
57874 Points
15509 Posts
Re: How to load html page into the main page ?
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
https://css-tricks.com/the-simplest-ways-to-handle-html-includes/
All-Star
48310 Points
18004 Posts
Re: How to load html page into the main page ?
Dec 07, 2020 01:30 PM|PatriceSc|LINK
Hi,
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)
Member
6 Points
85 Posts
Re: How to load html page into the main page ?
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 ?
All-Star
48310 Points
18004 Posts
Re: How to load html page into the main page ?
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.