hi
i m using login control for the first time i got the following error.plz anyone help me to solve the error
'_Default.SiteLevelCustomAuthenticationMethod(string, string)': not all code paths return a value
private bool SiteLevelCustomAuthenticationMethod(string UserName, string Password)
{
bool boolReturnValue = false;
string strConnection = "server=Laby/Laby;database=cfintranet;uid=sa;pwd=;";
SqlConnection Connection = new SqlConnection(strConnection);
String strSQL = "Select * From user";
SqlCommand command = new SqlCommand(strSQL, Connection);
SqlDataReader Dr;
Connection.Open();
Dr = command.ExecuteReader();
while (Dr.Read())
{
if ((UserName == Dr["name"].ToString()) & (Password == Dr["Password"].ToString()))
{
boolReturnValue = true;
}
Dr.Close();
return boolReturnValue;
}
}