`include` statement for aspx?
I'm trying to include an external aspx page on my aspx (VB) page. If it were php i would have done it with a line of code like <? include "http://www.google.com"; ?>
what would be the equivalent of include statement for aspx? Isn't there a VERY SIMPLE way of doing开发者_运维技巧 this?
I don't really understand why you need this.. But
- If you need to have some another page on your page, you can use
iframes
for that. - If you create your custom control what would do HTTP request to required site output response as control HTML.
In ASP.Net, you set up the page to include as a custom or user control, and add the control to the page. Includes don't really work well.
It really depends what you are intending to do, if you are trying to get some shared user interface elements, then master pages, or user controls are what you are looking for
If you are trying to include common functionality, you can inherit this by inheriting from a base page which itself inherits from System.Web.UI.Page, and which contains the common code.
精彩评论