日期:2011-02-13 浏览次数:20412 次
<FONT face="Arial" color="#cc66cc" size="5">常规页面内容</FONT>
<%@ Application Language="VB" %><script runat="server"> Sub Application_BeginRequest(sender As Object, e As EventArgs) ' 生成页眉 Context.Response.Write("<html>" + ControlChars.Lf + _"<body bgcolor=#efefef>" + ControlChars.Lf + "<hr>" + _ ControlChars.Lf) End Sub Sub Application_EndRequest(sender As Object, e As EventArgs) ' 生成页脚 Context.Response.Write("<hr>" + ControlChars.Lf + _ "2002 Microsoft Corporation 版权所有" + _ ControlChars.Lf + "</body>" + ControlChars.Lf + "</html>") End Sub </script>
<%@ Application Language="C#" %><script runat="server"> void Application_BeginRequest(Object sender, EventArgs e) { // 生成页眉 Context.Response.Write("<html>\n<body bgcolor=#efefef>\n<hr>\n"); } void Application_EndRequest(Object sender, EventArgs e) { // 生成页脚 Context.Response.Write("<hr>\2002 Microsoft Corporation 版权所有\n"); Context.Response.Write("</body>\n</html>"); }</script>
<script language="VB" runat="server"> Sub Page_Load(sender As Object, e As EventArgs) { If User.Identity.IsAuthenticated Then welcome.Text = "欢迎" + User.Identity.Name Else ' 尚未登录,添加一个指向登录页的链接 welcome.Text = "请登录!" welcome.NavigateUrl = "signin.aspx" End If End Sub</script><asp:HyperLink id="welcome" runat="server" maintainstate="false"></asp:HyperLink>
<script language="C#" runat="server"> void Page_Load(object sender, EventArgs e) { if (User.Identity.IsAuthenticated) { welcome.Text = "欢迎" + User.Identity.Name; } else { &nb