1

I want to include one aspx file into another: I am creating pages with menu and I want to use menu.aspx in few aspx pages.

I found that there is a function <!--#include virtual="somefilename"--> and
<!--#include file="somefilename"--> however I don't to how open specific file.

When I try to insert file url address: <!--#include file="http://sitename/menu.aspx"--> , after loading site it give me error. What should I do?

1

I guess the better approach will be to use Custom User Controls. You can create a user control and place it within a page using Register tag. Back in days when i develop master page using visual studio, i create Custom user controls for navigation and place them in master page.

The advantage using this will be you can place them in master page, page layouts, site pages using SPD and also in Application Pages.

To learn more about it follow the below URL.

http://www.c-sharpcorner.com/article/creating-custom-user-control-templates-in-sharepoint-2013-using-visual-studio/

0

SharePoint has a web part called Page Viewer Web part which could display a page in the web part. You can check if it matches your requirement. Page Viewer Web part

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.