Response.Write(Label1.Text ="Invalid User Name and Password");
Why did you put Label1.Text inside the Response.Write()? That's the issue.
Don't use
Response.Write
to display messages. Use any
Label
for that.
if (temp == 1){
lblError.Text="Invalid User Name and Password";
}
I know you were out of coffee at that time.