That should be straightforward. The code itself tells you what it's supposed to do. You should take a closer look.
However, here you go assuming you are a beginner:
if (txtUsername.Text != ""; txtPassword.Text != "")
{
Results = Validate_login(txtUsername.Text, txtPassword.Text);
}
else
{
lblMessage.Text = "Please make sure that the username and the password is Correct";
}
This code block gets the user input from the two textboxes txtUserName and txtPassword. Using the .Text property the string from both is checked first to see that a value is entered. Once that is verified then a method Validate_login is called to check, yep you guessed it, to validate the username and the password entered. The return value is stored in the variable Results.
In the second case where either username or password is totally blank, a label is given a message to be displayed.
Now the second one.
if (Results == 1)
{
lblMessage.Text = "Login is Good, Send the User to another page or enable controls";
}
else
{
lblMessage.Text = "Invalid Login";
lblMessage.ForeColor = System.Drawing.Color.Red;
}
Using the variable which holds the return value the variable is checked to see if it holds the value "1" or something else.