登陆示例 Ext怎么连接后台

//前台显示部分





深圳界面设计

//后台代码部分

protected void Page_Load(object sender, EventArgs e)
{
string ParamValue = Request["ParamValue"];
if (ParamValue == "1")
{
string UserName = Request.QueryString["ParamUserName"];
string Password = Request.QueryString["ParamPassword"];
//连接数据库
#region 连接数据库
/*
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "连接字符串";
if (conn.State == ConnectionState.Closed)
conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = string.Format(" select UserID from 表 where UserName = '{0}' and Password = '{1}'", UserName, Password);
object obj = cmd.ExecuteScalar();
if (obj != null)
{
if (Convert.ToString(obj) != "")
{
Response.Write("{success:true}");
}
else
{
Response.Write("{success:false}");
}
}
else
{
Response.Write("{success:false}");
}
*/
#endregion
Response.Write("{success:true}");
}
}

你可能感兴趣的:(EXT,Ajax,json,UI)