评论会员:Rethinaprasath 时间:2012/02/07
private void txtCourseName_Leave(object sender, EventArgs e)
{
SqlCon = DBCon.DBOpenConnection();
Query = "Select distinct Name from tblDepartmentMaster";
SqlCmd = new SqlCommand(Query, SqlCon);
SqlDr = SqlCmd.ExecuteReader();
while (SqlDr.Read())
{
txtName.Text = SqlDr.GetString(0).ToString();
}
MessageBox.Show("Already Exist the Name!", "Already Exist", MessageBoxButtons.OK, MessageBoxIcon.Information);
txtCourseName.Clear();
ActiveControl = txtCourseName;
SqlDr.Close();
}
评论会员:archanakumari 时间:2012/02/07
{C}
[编辑]添加前标签[/编辑]
评论会员:amitgajjar 时间:2012/02/07
DataSet ds = new DataSet();
SqlDataAdapter ad = new SqlDataAdapter("select * from technicalregistration where strloginname='" + txtusername.Text + "' and strloginpwd='" + txtpassword.Text + "'", sqlcon);
ad.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
Response.Redirect("Somepage.aspx");
}
else
lblmessage.Text = "Invalid UserName and Password";
txtusername.Text = "";
txtpassword.Text = "";
的
你可以去这个
[编辑]增加了预标记[/编辑]
评论会员:archanakumari 时间:2012/02/07
。没有为辊的where子句编写一个简单的查询
如果查询返回一个结果,有一排,辊数量表中。
例如:
选择*从登记rollno =
评论会员:游客 时间:2012/02/07
如果存在(选择寄存器表条件)NBSProllno;将返回true,如果辊表中存在该登录|amitgajjar:{BR?}{S0的}如果没有返回false
| Session变量存储在服务器上
评论会员:阿赫亚virkar 时间:2012/02/07
]