How can I include an aspx page in another aspx page? in asp.net

I am working on a custom web application, and since I have many separate blocks, I want to place them on another page, I was wondering how can I include aspx content on an existing page? the reason I am asking about aspx and not custom web controls is because I was planning on using pagemethods on these separate pages. Another reason is that I saw someone say that we can do this, now we cannot find the link, so I thought I would try it too, as it looks very neat :) Thanks

0


source to share


2 answers


Server.Execute (secondUrl) can do what you want. But UserControls is definitely bigger than ASP.Net-ish :).



+2


source


Based on what you are describing, custom controls are the correct answer as they allow you to place code anywhere on any reusable page.



Can you explain what you mean by "aspx content" - is it just html it controls? Also, what page methods do you mean?

0


source







All Articles