Server.Execute("Child.aspx");//在父页面中可以直接执行子页面
Server.Transfer("TranferTo.aspx");//url中是当前页面,但是执行的是Tranfer后的页面
Response.Redirect("TranferTo.aspx");//url和页面显示的都是同一个页面,并且都为Redirect后的页面
Server.Encode();//将html转为编译后的
Server.Decode();//将编译后的html转为html
public partial class Encode : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(
Server.HtmlEncode("<html><head></head></html>"));
string str = Server.HtmlDecode(@"<html><head></head></html>
");
}
}
<div>
<%--显示一段Html代码--%>
<html >
<head ></head >
<body >
<h1 >ssssssssss</h1 >
</body >
</<html >
</div>