错误 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");
}
}
}
}