When running this code from VS.NET i get this error page which highlights the
first line of the If statement and says it needs a ; at the end of it, tried
that but doesnt fix the problem. As you can tell I'm a newbie so be gentle :)
..
Compiler Error Message: CS1002: ; expected
void btnSingIn_Click(Object sender, System.EventArgs e)
{
// Add user authentication logic here
If (txtUserId.Text.Length >= 4 && txtPassword.Text.Length >= 4 &&
txtUserId.Text.StartsWith("J"))
{
lblResult.Text = "Valid User!";
}
else
{
lblResult.Text = "Valid User!";
}
}
void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialise the page here
lblResult.Text = "Page refreshed at: " + DateTime.Now;
}