日期:2014-05-17 浏览次数:20589 次
using System;
using System.Collections.Generic;
using System.Linq;
using System.Configuration;
using System.Web;
using System.Data;
using System.Web.UI;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.WebControls;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("执行1%%%%%%%%%%%%%%%%%%%%");
Session["name1"] = TextBox1.Text.Trim().ToString();
Session["name2"] = TextBox2.Text.Trim().ToString();
Session.Timeout = 29;
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text.Trim() == "diweiguang" && TextBox2.Text.Trim() == "diweiguang")
{
ClientScript.RegisterStartupScript(this.GetType(), "",
"alert('恭喜你!登陆成功喽!');", true);
Response.Redirect("Default2.aspx");
}
else if (TextBox1.Text.ToString().Trim() == ""
&& TextBox2.Text.ToString().Trim() == "")
{
ClientScript.RegisterStartupScript(this.GetType(), "",
"alert('请输入您的账户或者密码!!');", true);
Response.Redirect("Default.aspx");
}
else