本帖最后由 Earl0 于 2009-10-31 22:40:37 编辑

解决方案 »

  1.   

     try
            {            if (CUser.checkUserLogin(txtName.Value, txtPwd.Value))
                {
                    string userID = CUser.GetUserID(txtName.Value, txtPwd.Value);
                    // 增加session信息
                    this.Session["currentUserID"] = userID;
                  string userType = CUser.GetUserID(txtName.Value, txtPwd.Value);
                    if (userType.Equals("0"))
                    {
                        Response.Redirect("admin.aspx");
                    }
                    else if (userType.Equals("1"))
                    {
                        Response.Redirect("admin1.aspx");
                    }
                    else
                    {
                        Response.Redirect("user.aspx");
                    }
                }
                else
                {
                    OConfig.AlertInfoWindow("您输入的用户名或者密码错误,请重新输入!", this);
                    return;
                }
            }
            catch (Exception)
            {
                OConfig.AlertInfoWindow("系统登录失败,请重试!", this);
            }