Server.MapPath()和Request.MapPath()是等价的
ServerDemo.aspx
主页面内容
<% Server.Execute("Child.aspx"); %>
Child.aspx
子页面
Child.aspx.cs
Response.Write("aaaaaaa");
类似于<iframe></iframe>
与Response.Redirect的区别。Transfer:服务端跳转,不会向浏览器返回任何内容,所以地址栏中的URL地址不变。
ServerDemo.aspx
<%=Server.HtmlEncode("<font color='red'></font>")%>
被编码,防止跨站脚本攻击
<a href="aa.aspx?a=<%=Server.UrlEncode("") %>"></a>