日期:2014-05-17 浏览次数:20625 次



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
namespace WebApplication37
{
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void B_login_Click(object sender, EventArgs e)
{
if (tb_id.Text == "" || tb_pwd.Text == "")
{
Response.Write("输入登录信息不完整,请重新输入!");
}
SqlConnection con = new SqlConnection("Server = ygu-PC\\SQLEXPRESS;User Id = YGU-PC\\ygu;DataBase = rcloud");
SqlConmmand cmd = new SqlCommand(string.Format("SELECT COUNT(*)FROM rcloud WHERE username = '{0}'AND userpassword = '{1}'", this.tb_id.Text.Trim(), this.tb_pwd.Text.Trim()), con);
}
protected void B_reg_Click(object sender, EventArgs e)
{
Response.Redirect("registe.aspx");
}
}
}