www.pudn.com > chat.rar > login.aspx.cs, change:2011-10-11,size:1003b


using System; 
using System.Collections; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Drawing; 
using System.Data; 
using System.Linq; 
using System.Web; 
using System.Web.SessionState; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.HtmlControls; 
 
 
public partial class _Default : System.Web.UI.Page 
{ 
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        string username = "zhangsan"; 
        string password = "123"; 
        if (textboxusername.Text == username && textboxpassword.Text == password) 
        { 
            Session.Add("user_name", username); 
            Session.Add("pass_word", password); 
            Response.Redirect("main.html"); 
        } 
        else 
        { 
            Response.Write("<Script Language=JavaScript>alert(\"验证失败,请重新登录!\");</Script>"); 
        } 
 
 
    } 
}