none
using system.data.sqlclient;中的SYSTEM找不到类型或命名空间名称“system”(是否缺少 using 指令或程序集引用?) RRS feed

  • 问题

  • 错误 2 找不到类型或命名空间名称“system”(是否缺少 using 指令或程序集引用?)  我将所有代码粘贴出来,高手帮忙看看 VS2008环境下
    using System;
    
    using System.Collections;
    
    using System.Configuration;
    
    using System.Data;
    
    using System.Linq;
    
    using System.Web;
    
    using System.Web.Security;
    
    using System.Web.UI;
    
    using System.Web.UI.HtmlControls;
    
    using System.Web.UI.WebControls;
    
    using System.Web.UI.WebControls.WebParts;
    
    using System.Xml.Linq;
    
    using system.data.Sqlclient;
    
    
    
    namespace WebApplication2
    
    {
    
        public partial class WebForm1 : System.Web.UI.Page
    
        {
    
            protected void Page_Load(object sender, EventArgs e)
    
            {
    
                string username = Request.Form["username"];
    
                string userPWD= Request.Form["username"];
    
                sqlconnection con = sqlconnection("sever=.;database=database;");
    
                con.open();
    
                sqlcommand cmd = new sqlcommand("select count(*) from admin where name='" + username + "'and pwd='" + userPWD + "' ");
    
                int count = Convert.ToInt32(cmd.executescalar());
    
                if (count > 0)
    
                {
    
                    Response.Redirect("main.aspx");
    
                }
    
                else
    
                {
    
                    Response.Redirect("loginfail.htm");
    
                }
    
            }
    
        }
    
    }
    
    
    
    
    2010年3月8日 15:41

答案

全部回复