求教ASP.NET连接SQL SERVER密码登录有关问题

求教ASP.NET连接SQL SERVER密码登录问题
小弟正在做一个网页作业。网页要求密码登录后才可以转到其他页面。
1.登录界面如下:
2. 如果没有用户帐号,可以创建一个新的,新的帐号密码将写到数据库里面。数据库的表如下:
CREATE TABLE userlogin
(
userid varchar(30),
password varchar(30)
)

3.我设计了一个STORED PROCEDURE写入数据。如下
--这部分没问题了,把这个存储过程链接到VISUAL STUDIO里面的WEB PAGE也能成功插入数据到数据库里面
CREATE PROCEDURE insert_pw
@userid varchar(30), @password varchar(30)
AS
BEGIN
INSERT INTO userlogin VALUES (@userid, HASHBYTES (‘SHA1’, @password))
END
GO
4. 在VISUAL 里面,我用了两个TEXTBOX分别用来写入SP的两个参数@userid, @password。 一个button用来提交。写入成功
5. 现在问题出在我不知道如何把刚写入的密码登录。登录后可以显示的界面大概是这样的:

希望大神们指教一下我如何使用已经保存在数据库里面的用户名和密码登录到其他界面


------解决方案--------------------
讲了一大堆大概明白你说的是什么不就是一跳查询语句啊
 string sql = "select AccountID,Password,Remaining from dbo.Account where AccountID=@AccountID and Password=@Password";
SqlParameter sp1 = new SqlParameter("@AccountID", AccountID);
SqlParameter sp2 = new SqlParameter("@Password", Password);
return SqlHepler.ExecuteScalar(sql, sp1, sp2);
在写个方法调用一下
Commom.Bean.Account bean = new Commom.Bean.Account();
bean.Accountid = TextBox1.Text;
bean.Password = TextBox2.Text;
bool Login = BuessinessLogic.Account.Login(bean);
if (Login)
{
Session["Bean"] = bean;
Response.Redirect("Index.aspx");
}
else
{
Commom.Method.MessageBox.Show("登录失败", this);
}
------解决方案--------------------
探讨
讲了一大堆大概明白你说的是什么不就是一跳查询语句啊
string sql = "select AccountID,Password,Remaining from dbo.Account where AccountID=@AccountID and Password=@Password";
SqlParameter sp1 = new SqlParameter("@AccountID", ……

------解决方案--------------------
用mvc,新建、修改、删除、登录 你都不用管了
------解决方案--------------------
首先,当用户不存在时就应该进行注册操作,而不是由系统直接创建;
那样如果别人给你灌水咋办?

探讨
引用:
讲了一大堆大概明白你说的是什么不就是一跳查询语句啊
string sql = "select AccountID,Password,Remaining from dbo.Account where AccountID=@AccountID and Password=@Password";
SqlParameter sp1 = new Sq……

------解决方案--------------------
刚开始学,写个简单点,搞什么mvc啊,走都不会,还要飞