一直在jsp中用<jsp:inclued .../> 可以包含其他页面返回的结果
但在asp.net中一直冒找到
但今天也看到了其他一种可以通用的包含在asp.net页面方式
如:
<iframe align="center" src="include.aspx?id=<%=2 %>" allowtransparency="" frameborder="0" scrolling="yes"
width="100" height="100">
</iframe>
include.aspx
如:
<form id="form1" runat="server">
<div>
<%=hello %>
</div>
include.aspx.cn
如:
public string hello = "hello! hexianghong";
protected void Page_Load(object sender, EventArgs e)
{
string id = Request["id"].ToString();
if (id.Equals ("1"))
{
hello = "hello! hexianghong";
}
else
{
hello = "hello! luoxufeng";
}
}