drag and drop the login control in your aspx page and include the following code


protected void Login1_Authenti cate(object sender, AuthenticateEve ntArgs e)
{
try
{
query = "select * from Registration where UserId='" + Login1.UserName + "' and Password='" + Login1.Password + "'";
cmd = new SqlCommand(quer y, con);...