日期:2014-05-18  浏览次数:20367 次

超菜鸟问题,页面递交前和递交后显示不同
前台
HTML code

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="manage_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="text-align: center" align="center" runat="server">
        <asp:Login ID="Login_User" runat="server" OnAuthenticate ="Login_User_Authenticate" >
            <LayoutTemplate><table style="width: 275px">
                <tr>
                    <td colspan="2" rowspan="1" style="width: 4px">
                    </td>
                </tr>
                <tr>
                    <td colspan="2" rowspan="1" style="width: 4px">
                        <table style="width: 234px">
                            <tr>
                                <td style="width: 100px; text-align: right">
                                    用户名:</td>
                                <td style="width: 75px; text-align: left;">
                                    <asp:TextBox ID="UserName" runat="server" Width="100px"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td style="width: 100px; text-align: right">
                                    密 码:</td>
                                <td style="width: 75px; text-align: left;">
                                    <asp:TextBox ID="Password" runat="server" TextMode="Password" Width="100px"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td style="width: 100px; text-align: right">
                                    验证码:</td>
                                <td style="width: 75px; text-align: left;">
                                    <asp:TextBox ID="TextBox3" runat="server" Width="50px"></asp:TextBox></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" rowspan="2" style="width: 4px">
                        <asp:Button ID="Button1" runat="server" CommandName="Login" Text="Button" /></td>
                </tr>
                <tr></tr></table>
            </LayoutTemplate>
        </asp:Login>    
    </div>1
    </form>
</body>
</html>




后台
HTML code

Partial Class manage_Default
    Inherits System.Web.UI.Page

    Protected Sub Login_User_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login_User.Authenticate
        Response.Write("<script language='javascript'>alert('登录!')</script>")
        'e.Authenticated = True
    End Sub

En